Add autoconf checks for headers we include for FIONREAD

Add autoconf checks for the extra headers we include to define FIONREAD.
This needs sys/socket.h on Cygwin, and none of the alternatives on
Windows.
This commit is contained in:
Jon Turney 2019-03-13 13:12:20 +00:00
parent 87c77a1e6d
commit fea80d03c3
No known key found for this signature in database
GPG key ID: C7C86F0370285C81
2 changed files with 8 additions and 1 deletions

View file

@ -139,7 +139,7 @@ fi
AC_MSG_RESULT($XLIB_LOADABLE_XCURSOR)
# Checks for header files.
AC_CHECK_HEADERS([sys/filio.h sys/select.h])
AC_CHECK_HEADERS([sys/filio.h sys/select.h sys/ioctl.h sys/socket.h])
# Checks for typedefs, structures, and compiler characteristics.

View file

@ -52,6 +52,11 @@ from The Open Group.
#include <sys/filio.h>
#endif
/* Needed for FIONREAD on Cygwin */
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
/* Needed for ioctl() on Solaris */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@ -60,7 +65,9 @@ from The Open Group.
#ifdef XTHREADS
#include "locking.h"
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
/* these pointers get initialized by XInitThreads */
LockInfoPtr _Xglobal_lock = NULL;