summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2010-09-13 21:51:05 +0000
committerChris Wilson <chris+github@qwirx.com>2010-09-13 21:51:05 +0000
commit176450750e98fd8108af83db94681fe897adfc18 (patch)
treef50f3915bb3e020224fe2fb60d151c37507138ac
parent68eff12b4173e626b69d32954a2eddca811a819b (diff)
Fix compile on Debian Squeeze with libbsd-dev and libedit-dev installed,
thanks to Dave Bamford for reporting and debugging. (merges [2734] from 0.11)
-rw-r--r--configure.ac2
-rw-r--r--lib/server/Daemon.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4802b139..7021ea1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,6 +126,7 @@ AC_CHECK_HEADERS([syslog.h time.h cxxabi.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])
AC_CHECK_HEADERS([sys/uio.h sys/xattr.h])
+AC_CHECK_HEADERS([bsd/unistd.h])
AC_CHECK_HEADER([regex.h], [have_regex_h=yes])
@@ -225,6 +226,7 @@ AC_FUNC_ERROR_AT_LINE
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid gettimeofday waitpid])
+AC_SEARCH_LIBS([setproctitle], ["bsd"])
# NetBSD implements kqueue too differently for us to get it fixed by 0.10
# TODO: Remove this when NetBSD kqueue implementation is working
diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp
index e1bdab02..4888767a 100644
--- a/lib/server/Daemon.cpp
+++ b/lib/server/Daemon.cpp
@@ -19,6 +19,10 @@
#include <string.h>
#include <stdarg.h>
+#ifdef HAVE_BSD_UNISTD_H
+ #include <bsd/unistd.h>
+#endif
+
#ifdef WIN32
#include <ws2tcpip.h>
#endif