]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
system.h: include sys/poll.h for AIX
authorDaniel Stenberg <daniel@haxx.se>
Fri, 25 Aug 2017 21:42:38 +0000 (23:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 27 Aug 2017 17:04:45 +0000 (19:04 +0200)
... to get the event/revent defines that might be used for the poll
struct.

Reported-by: Michael Smith
Fixes #1828
Closes #1833

include/curl/system.h

index a6640ba52c25206558caf58e5948e84a81713773..39dae754cdb31eda68870b92d1c50e1819725d4a 100644 (file)
 # define CURL_TYPEOF_CURL_SOCKLEN_T int
 #endif
 
+#ifdef _AIX
+/* AIX needs <sys/poll.h> */
+#define CURL_PULL_SYS_POLL_H
+#endif
+
+
 /* CURL_PULL_WS2TCPIP_H is defined above when inclusion of header file  */
 /* ws2tcpip.h is required here to properly make type definitions below. */
 #ifdef CURL_PULL_WS2TCPIP_H
 #  include <sys/socket.h>
 #endif
 
+/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file    */
+/* sys/poll.h is required here to properly make type definitions below.   */
+#ifdef CURL_PULL_SYS_POLL_H
+#  include <sys/poll.h>
+#endif
+
 /* Data type definition of curl_socklen_t. */
 #ifdef CURL_TYPEOF_CURL_SOCKLEN_T
   typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;