From 81a229045a81337d36a845da7b497baab7b1a849 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Fri, 27 Jul 2018 15:10:25 +0200 Subject: [PATCH] avrdude: Fix: Stray winsock usage on Windows --- xs/src/avrdude/ser_win32.c | 2 ++ 1 file changed, 2 insertions(+) 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)