diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-02-09 14:24:55 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-02-09 14:24:55 -0500 |
commit | c23461a22a1ead0a34dc209c2918ec4ccaf61475 (patch) | |
tree | ae9f8919e0c8cc170676f984ef96522d920a3f69 /src/backend | |
parent | e327291e4a96571c85b6a9b140e1a8116fb47ec6 (diff) | |
download | postgresql-c23461a22a1ead0a34dc209c2918ec4ccaf61475.tar.gz postgresql-c23461a22a1ead0a34dc209c2918ec4ccaf61475.zip |
Test honestly for <sys/signalfd.h>.
Commit 6a2a70a02 supposed that any platform having <sys/epoll.h>
would also have <sys/signalfd.h>. It turns out there are still a
few people using platforms where that's not so, so we'd better make
a separate configure probe for it. But since it took this long to
notice, I'm content with the decision to not have a separate code
path for epoll-only machines; we'll just fall back to using poll()
for these stragglers.
Per gripe from Gabriela Serventi. Back-patch to v14 where this
code came in.
Discussion: https://postgr.es/m/CAHOHWE-JjJDfcYuLAAEO7Jk07atFAU47z8TzHzg71gbC0aMy=g@mail.gmail.com
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/storage/ipc/latch.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index 1d893cf863d..6ff1ecbe098 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -43,6 +43,9 @@ #ifdef HAVE_SYS_EVENT_H #include <sys/event.h> #endif +#ifdef HAVE_SYS_SIGNALFD_H +#include <sys/signalfd.h> +#endif #ifdef HAVE_POLL_H #include <poll.h> #endif @@ -69,7 +72,7 @@ #if defined(WAIT_USE_EPOLL) || defined(WAIT_USE_POLL) || \ defined(WAIT_USE_KQUEUE) || defined(WAIT_USE_WIN32) /* don't overwrite manual choice */ -#elif defined(HAVE_SYS_EPOLL_H) +#elif defined(HAVE_SYS_EPOLL_H) && defined(HAVE_SYS_SIGNALFD_H) #define WAIT_USE_EPOLL #elif defined(HAVE_KQUEUE) #define WAIT_USE_KQUEUE @@ -81,10 +84,6 @@ #error "no wait set implementation available" #endif -#ifdef WAIT_USE_EPOLL -#include <sys/signalfd.h> -#endif - /* typedef in latch.h */ struct WaitEventSet { |