summaryrefslogtreecommitdiff
path: root/gdb/ser-pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ser-pipe.c')
-rw-r--r--gdb/ser-pipe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 3c37f141ae2..4941845c020 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -23,7 +23,9 @@
#include "defs.h"
#include "serial.h"
#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#include <sys/socket.h>
#include <sys/time.h>
#include <fcntl.h>
@@ -70,7 +72,7 @@ pipe_open (scb, name)
serial_t scb;
const char *name;
{
-#if !defined(O_NONBLOCK) || !defined(F_GETFL) || !defined(F_SETFL)
+#if !defined(O_NONBLOCK) || !defined(F_GETFL) || !defined(F_SETFL) || !HAVE_SOCKETPAIR
return -1;
#else
struct pipe_state *state;