Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 43bcf23

Browse files
committed
Fix compilation on non-linux POSIX systems
1 parent d07dff9 commit 43bcf23

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ static int pthread_join(pthread_t th, void **thread_return);
105105
#ifdef USE_POLL
106106
#define SCKTWTMTHD "poll"
107107
#undef MAXCLIENTS
108+
#ifdef POLLRDHDUP
108109
#define POLL_EVENTS (POLLIN|POLLPRI|POLLRDHUP)
109110
#define POLL_FAIL (POLLERR|POLLHUP|POLLNVAL|POLLRDHUP)
111+
#else
112+
#define POLL_EVENTS (POLLIN|POLLPRI)
113+
#define POLL_FAIL (POLLERR|POLLHUP|POLLNVAL)
114+
#endif
110115
#define PFD_CLREV(s) { do { if ((s)->pfdp) { ((s)->pfdp)->revents = 0; } } while(0); }
111116
#define PFD_ZERO(s) { do { if ((s)->pfdp) { memset((s)->pfdp, 0, sizeof(struct pollfd)); } } while(0); }
112117
#define PFD_SETFD(s) { do { ((s)->pfdp)->fd = PQsocket((s)->con); } while(0); }

0 commit comments

Comments
 (0)