avrdude: Fix: Stray winsock usage on Windows
This commit is contained in:
parent
a9aca4426c
commit
81a229045a
1 changed files with 2 additions and 0 deletions
|
@ -311,8 +311,10 @@ static int ser_open(char * port, union pinfo pinfo, union filedescriptor *fdp)
|
||||||
static void ser_close(union filedescriptor *fd)
|
static void ser_close(union filedescriptor *fd)
|
||||||
{
|
{
|
||||||
if (serial_over_ethernet) {
|
if (serial_over_ethernet) {
|
||||||
|
#ifdef HAVE_LIBWS2_32
|
||||||
closesocket(fd->ifd);
|
closesocket(fd->ifd);
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
HANDLE hComPort=(HANDLE)fd->pfd;
|
HANDLE hComPort=(HANDLE)fd->pfd;
|
||||||
if (hComPort != INVALID_HANDLE_VALUE)
|
if (hComPort != INVALID_HANDLE_VALUE)
|
||||||
|
|
Loading…
Reference in a new issue