* config/alpha/tm-fbsd.h (FRAME_CHAIN_VALID): Remove.
[deliverable/binutils-gdb.git] / gdb / ser-tcp.c
index 0e96f0322d543215f685318cffaa4e541baf5175..6dc82846b6fe223b433b9a0596f3a63be4b7db0e 100644 (file)
 #include "ser-unix.h"
 
 #include <sys/types.h>
-#include <sys/ioctl.h>
+
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>  /* For FIONBIO. */
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>  /* For FIONBIO. */
+#endif
+
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -158,6 +165,11 @@ tcp_open (struct serial *scb, const char *name)
   tmp = 0;
   ioctl (scb->fd, FIONBIO, &tmp);
 
+  /* Disable Nagle algorithm. Needed in some cases. */
+  tmp = 1;
+  setsockopt (scb->fd, IPPROTO_TCP, TCP_NODELAY,
+             (char *)&tmp, sizeof (tmp));
+  
   /* If we don't do this, then GDB simply exits
      when the remote side dies.  */
   signal (SIGPIPE, SIG_IGN);
This page took 0.022654 seconds and 4 git commands to generate.