summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-04-12 22:03:41 +0000
committerChris Wilson <chris+github@qwirx.com>2014-04-12 22:03:41 +0000
commit058160d2df3fd4801b1562fce5d29d9f3da95c1c (patch)
tree3eaa3a8652bef8b6b8d4a1f8576cea98b5c601e3
parentb8cab5e4f0340196cc0c9ad66a64e36697ad13b7 (diff)
Fix compilation on Debian 7 (Wheezy) by including bsd/unistd.h.
If libedit is installed then -ledit will be detected and added to the link line, which makes the test for getpeereid pass. Then SocketStream.cpp tries to use it, but that won't work unless we include bsd/unistd.h where the prototype is declared.
-rw-r--r--lib/server/SocketStream.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/server/SocketStream.cpp b/lib/server/SocketStream.cpp
index 6ef4b8d1..f0bfcf94 100644
--- a/lib/server/SocketStream.cpp
+++ b/lib/server/SocketStream.cpp
@@ -25,6 +25,10 @@
#include <ucred.h>
#endif
+#ifdef HAVE_BSD_UNISTD_H
+ #include <bsd/unistd.h>
+#endif
+
#include "SocketStream.h"
#include "ServerException.h"
#include "CommonException.h"