From 5f53c4bbc0836a697a5cde7d81de00ad68001b57 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 13 Nov 2020 15:10:39 -0500 Subject: [PATCH] port: extensions are enable by AC_USE_SYSTEM_EXTENSIONS MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Available extensions are enabled at configure, make the poll wrapper use them. Change-Id: I5a4f99f0b498152d779a2bca3e53775013fdba60 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- src/common/compat/poll.hpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/common/compat/poll.hpp b/src/common/compat/poll.hpp index 3cb07bf93..5b6c2a00b 100644 --- a/src/common/compat/poll.hpp +++ b/src/common/compat/poll.hpp @@ -213,16 +213,6 @@ static inline void lttng_poll_clean(struct lttng_poll_event *events) * Fallback on poll(2) API */ -/* Needed for some poll event values */ -#ifndef __USE_XOPEN -#define __USE_XOPEN -#endif - -/* Needed for some poll event values */ -#ifndef __USE_GNU -#define __USE_GNU -#endif - #include #include @@ -235,15 +225,13 @@ enum { LPOLLRDBAND = POLLRDBAND, LPOLLWRNORM = POLLWRNORM, LPOLLWRBAND = POLLWRBAND, -#ifdef __linux__ +#ifdef __USE_GNU LPOLLMSG = POLLMSG, LPOLLRDHUP = POLLRDHUP, -#elif (defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__sun__) || defined(__APPLE__)) +#else LPOLLMSG = 0, LPOLLRDHUP = 0, -#else -#error "Please add support for your OS." -#endif /* __linux__ */ +#endif /* __USE_GNU */ LPOLLERR = POLLERR, LPOLLHUP = POLLHUP | POLLNVAL, /* Close on exec feature does not exist for poll(2) */ -- 2.34.1