Automatic date update in version.in
[external/binutils.git] / gdb / ser-tcp.c
index 618d2d9..039b043 100644 (file)
@@ -1,6 +1,6 @@
 /* Serial interface for raw TCP connections on Un*x like systems.
 
-   Copyright (C) 1992-2018 Free Software Foundation, Inc.
+   Copyright (C) 1992-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,8 +24,8 @@
 #include "gdbcmd.h"
 #include "cli/cli-decode.h"
 #include "cli/cli-setshow.h"
-#include "filestuff.h"
-#include "netstuff.h"
+#include "common/filestuff.h"
+#include "common/netstuff.h"
 
 #include <sys/types.h>
 
 #include <sys/ioctl.h>  /* For FIONBIO.  */
 #endif
 
-#include "gdb_sys_time.h"
+#include "common/gdb_sys_time.h"
 
 #ifdef USE_WIN32API
-#include <winsock2.h>
-#include <wspiapi.h>
+#if _WIN32_WINNT < 0x0501
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x0501
+#endif
+#include <ws2tcpip.h>
 #ifndef ETIMEDOUT
 #define ETIMEDOUT WSAETIMEDOUT
 #endif
@@ -371,7 +374,7 @@ net_open (struct serial *scb, const char *name)
 
   ioctl (scb->fd, FIONBIO, &ioarg);
 
-  if (success_ainfo->ai_socktype == IPPROTO_TCP)
+  if (success_ainfo->ai_protocol == IPPROTO_TCP)
     {
       /* Disable Nagle algorithm.  Needed in some cases.  */
       int tmp = 1;