diff --git a/build/configure.ac.system b/build/configure.ac.system index def75cdc1..383f28d46 100644 --- a/build/configure.ac.system +++ b/build/configure.ac.system @@ -88,7 +88,7 @@ AC_CHECK_HEADERS([stdint.h inttypes.h sys/int_types.h]) AC_CHECK_TYPES([uint64_t, uint128_t, __uint128_t]) dnl Check for socket support for any2ppm daemon -AC_CHECK_HEADERS([fcntl.h unistd.h signal.h sys/stat.h sys/socket.h sys/poll.h sys/un.h]) +AC_CHECK_HEADERS([fcntl.h unistd.h signal.h poll.h sys/stat.h sys/socket.h sys/poll.h sys/un.h]) dnl Check for infinite loops AC_CHECK_FUNCS([alarm]) diff --git a/meson.build b/meson.build index 9a78591bc..fddb3a28c 100644 --- a/meson.build +++ b/meson.build @@ -44,6 +44,7 @@ check_headers = [ ['signal.h'], ['sys/stat.h'], ['sys/socket.h'], + ['poll.h'], ['sys/poll.h'], ['sys/un.h'], ['sched.h', {'check-funcs': ['sched_getaffinity']}], diff --git a/test/any2ppm.c b/test/any2ppm.c index ac3b7f051..8d8d2f2cf 100644 --- a/test/any2ppm.c +++ b/test/any2ppm.c @@ -85,13 +85,18 @@ #include #endif -#if HAVE_UNISTD_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_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && (HAVE_POLL_H || HAVE_SYS_POLL_H) && HAVE_SYS_UN_H #include #include #include -#include #include +#if defined(HAVE_POLL_H) +#include +#elif defined(HAVE_SYS_POLL_H) +#include +#endif + #define SOCKET_PATH "./.any2ppm" #define TIMEOUT 60000 /* 60 seconds */ diff --git a/test/cairo-test-trace.c b/test/cairo-test-trace.c index 6b7e00afc..4eee5d30b 100644 --- a/test/cairo-test-trace.c +++ b/test/cairo-test-trace.c @@ -79,15 +79,23 @@ #include #include #include -#include #include #include #include #include + #if CAIRO_HAS_REAL_PTHREAD #include #endif +#if defined(HAVE_POLL_H) +#include +#elif defined(HAVE_SYS_POLL_H) +#include +#else +#error No poll.h equivalent found +#endif + #if HAVE_FCFINI #include #endif diff --git a/util/cairo-sphinx/sphinx.c b/util/cairo-sphinx/sphinx.c index 238d40064..5c5fcee77 100644 --- a/util/cairo-sphinx/sphinx.c +++ b/util/cairo-sphinx/sphinx.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -24,6 +23,14 @@ #include #include +#if defined(HAVE_POLL_H) +#include +#elif defined(HAVE_SYS_POLL_H) +#include +#else +#error No poll.h equivalent found +#endif + #include #include #include