diff --git a/xs/src/avrdude/ser_win32.c b/xs/src/avrdude/ser_win32.c index 20d085d13..3a05cfa90 100644 --- a/xs/src/avrdude/ser_win32.c +++ b/xs/src/avrdude/ser_win32.c @@ -311,8 +311,10 @@ static int ser_open(char * port, union pinfo pinfo, union filedescriptor *fdp) static void ser_close(union filedescriptor *fd) { if (serial_over_ethernet) { +#ifdef HAVE_LIBWS2_32 closesocket(fd->ifd); WSACleanup(); +#endif } else { HANDLE hComPort=(HANDLE)fd->pfd; if (hComPort != INVALID_HANDLE_VALUE)