diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-03-03 10:24:25 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-03-03 10:24:25 +0000 |
commit | 694f2eea9feecfdc437e6964d1e758fab7315af9 (patch) | |
tree | 64b5d023a10def81bfd347429975f11a5e94d64c /test/any2ppm.c | |
parent | 9304984f4e20beec7b4de6a4141e2fd489130006 (diff) | |
download | cairo-694f2eea9feecfdc437e6964d1e758fab7315af9.tar.gz |
[test/any2ppm] Add feature checks for daemon()
Add the feature checks for the presence of the daemon() function call.
Diffstat (limited to 'test/any2ppm.c')
-rw-r--r-- | test/any2ppm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/any2ppm.c b/test/any2ppm.c index 7b3dabb88..0149230c9 100644 --- a/test/any2ppm.c +++ b/test/any2ppm.c @@ -77,7 +77,7 @@ #include <libspectre/spectre.h> #endif -#if HAVE_FCNTL_H && HAVE_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && HAVE_SYS_POLL_H && HAVE_SYS_UN_H +#if HAVE_UNISTD_H && HAVE_FCNTL_H && HAVE_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && HAVE_SYS_POLL_H && HAVE_SYS_UN_H #include <fcntl.h> #include <signal.h> #include <sys/stat.h> @@ -89,7 +89,11 @@ #define SOCKET_PATH "./.any2ppm" #define TIMEOUT 60000 /* 60 seconds */ +#if _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) #define CAN_RUN_AS_DAEMON 1 +#else +#define CAN_RUN_AS_DAEMON 0 +#endif #endif #define ARRAY_LENGTH(A) (sizeof (A) / sizeof (A[0])) |