[#372] check for errno.h

This commit is contained in:
Mark Ellzey 2016-06-28 10:37:24 -07:00
parent e7abef1c4c
commit 303161777d
No known key found for this signature in database
GPG Key ID: F20A5EBD06A5B6C2
4 changed files with 9 additions and 0 deletions

View File

@ -288,6 +288,7 @@ CHECK_INCLUDE_FILE(sys/wait.h EVENT__HAVE_SYS_WAIT_H)
CHECK_INCLUDE_FILE(sys/resource.h EVENT__HAVE_SYS_RESOURCE_H)
CHECK_INCLUDE_FILE(sys/sysctl.h EVENT__HAVE_SYS_SYSCTL_H)
CHECK_INCLUDE_FILE(sys/timerfd.h EVENT__HAVE_SYS_TIMERFD_H)
CHECK_INCLUDE_FILE(errno.h EVENT__HAVE_ERRNO_H)
CHECK_FUNCTION_EXISTS_EX(epoll_create EVENT__HAVE_EPOLL)

View File

@ -243,6 +243,7 @@ AC_CHECK_HEADERS([ \
sys/timerfd.h \
sys/uio.h \
sys/wait.h \
errno.h \
])
AC_CHECK_HEADERS(sys/sysctl.h, [], [], [

View File

@ -382,6 +382,9 @@
/* Define to 1 if you have the <sys/wait.h> header file. */
#cmakedefine EVENT__HAVE_SYS_WAIT_H
/* Define to 1 if you have the <errno.h> header file. */
#cmakedefine EVENT__HAVE_ERRNO_H
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
#cmakedefine EVENT__HAVE_TAILQFOREACH
@ -394,6 +397,7 @@
/* Define if timercmp is defined in <sys/time.h> */
#cmakedefine EVENT__HAVE_TIMERCMP
/* Define to 1 if you have the `timerfd_create' function. */
#cmakedefine EVENT__HAVE_TIMERFD_CREATE

View File

@ -71,6 +71,9 @@ extern "C" {
#include <ws2tcpip.h>
#endif
#else
#ifdef EVENT__HAVE_ERRNO_H
#include <errno.h>
#endif
#include <sys/socket.h>
#endif