From 27aa81fe5a19940d2f39f902c1bede814d49bbb6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 25 Mar 2016 12:14:31 +0100 Subject: [PATCH] aix: fix 'POLLRDHUP undeclared' build error AIX doesn't have POLLRDHUP. Fixes the following compile-time error: src/unix/core.c: In function 'uv__io_start': src/unix/core.c:831:40: error: 'POLLRDHUP' undeclared assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT | UV__POLLRDHUP))); Fixes: https://github.com/libuv/libuv/issues/783 PR-URL: https://github.com/libuv/libuv/pull/785 Reviewed-By: Colin Ihrig Reviewed-By: Santiago Gimeno --- src/unix/internal.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/unix/internal.h b/src/unix/internal.h index e4b98943..2f9f7e98 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -102,7 +102,6 @@ # define UV__POLLOUT POLLOUT # define UV__POLLERR POLLERR # define UV__POLLHUP POLLHUP -# define UV__POLLRDHUP POLLRDHUP #endif #ifndef UV__POLLIN @@ -122,7 +121,11 @@ #endif #ifndef UV__POLLRDHUP -# define UV__POLLRDHUP 0x200 +# ifdef POLLRDHUP +# define UV__POLLRDHUP POLLRDHUP +# else +# define UV__POLLRDHUP 0x200 +# endif #endif #if !defined(O_CLOEXEC) && defined(__FreeBSD__)