diff options
author | George Matsumura <gmmatsumura01@bvsd.org> | 2020-08-31 01:36:20 -0600 |
---|---|---|
committer | George Matsumura <gmmatsumura01@bvsd.org> | 2020-09-05 12:15:57 +0000 |
commit | 9a3ad1df1cdca3559d0102918b7527005605df1a (patch) | |
tree | d508e1a8c5b3d67343efc46995fababd388d29a2 /test/cairo-test-trace.c | |
parent | 3b1bf9d6d3cbf2074eb347bc4cb33704f57d800d (diff) | |
download | cairo-9a3ad1df1cdca3559d0102918b7527005605df1a.tar.gz |
build: Include correct poll.h
Including sys/poll.h when poll.h is available produces a compile
warning on some systems, but only sys/poll.h is present on others
such as AIX. This makes sure the most suitable poll.h is included
in each situation.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
Diffstat (limited to 'test/cairo-test-trace.c')
-rw-r--r-- | test/cairo-test-trace.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 <sys/stat.h> #include <sys/socket.h> #include <sys/mman.h> -#include <sys/poll.h> #include <sys/un.h> #include <errno.h> #include <assert.h> #include <unistd.h> + #if CAIRO_HAS_REAL_PTHREAD #include <pthread.h> #endif +#if defined(HAVE_POLL_H) +#include <poll.h> +#elif defined(HAVE_SYS_POLL_H) +#include <sys/poll.h> +#else +#error No poll.h equivalent found +#endif + #if HAVE_FCFINI #include <fontconfig/fontconfig.h> #endif |