summaryrefslogtreecommitdiff
path: root/util/cairo-sphinx
diff options
context:
space:
mode:
authorGeorge Matsumura <gmmatsumura01@bvsd.org>2020-08-31 01:36:20 -0600
committerGeorge Matsumura <gmmatsumura01@bvsd.org>2020-09-05 12:15:57 +0000
commit9a3ad1df1cdca3559d0102918b7527005605df1a (patch)
treed508e1a8c5b3d67343efc46995fababd388d29a2 /util/cairo-sphinx
parent3b1bf9d6d3cbf2074eb347bc4cb33704f57d800d (diff)
downloadcairo-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 'util/cairo-sphinx')
-rw-r--r--util/cairo-sphinx/sphinx.c9
1 files changed, 8 insertions, 1 deletions
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 <sys/stat.h>
#include <sys/mman.h>
#include <sys/socket.h>
-#include <sys/poll.h>
#include <sys/un.h>
#include <unistd.h>
#include <fcntl.h>
@@ -24,6 +23,14 @@
#include <assert.h>
#include <pthread.h>
+#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
+
#include <cairo.h>
#include <cairo-script.h>
#include <cairo-script-interpreter.h>