summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-12-16 09:55:01 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-12-16 09:55:01 +0000
commitaeeeda3efad5266b0c52b92807bb0cc3b3f23b5c (patch)
treec0dd71b3f24038dfe6c7653cd6ea41fc36174201
parent21146fa414558ee31b08b14792feed71778bccdf (diff)
downloadhaskell-aeeeda3efad5266b0c52b92807bb0cc3b3f23b5c.tar.gz
#include <sys/select.h> if we have it (#3760)
-rw-r--r--configure.ac2
-rw-r--r--rts/posix/Select.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d9ca45348d..fa5f9a38e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -616,7 +616,7 @@ dnl off_t, because it will affect the result of that test.
AC_SYS_LARGEFILE
dnl ** check for specific header (.h) files that we are interested in
-AC_CHECK_HEADERS([bfd.h ctype.h dirent.h dlfcn.h errno.h fcntl.h grp.h limits.h locale.h nlist.h pthread.h pwd.h signal.h sys/mman.h sys/resource.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h time.h utime.h windows.h winsock.h sched.h])
+AC_CHECK_HEADERS([bfd.h ctype.h dirent.h dlfcn.h errno.h fcntl.h grp.h limits.h locale.h nlist.h pthread.h pwd.h signal.h sys/mman.h sys/resource.h sys/select.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h time.h utime.h windows.h winsock.h sched.h])
dnl ** check if it is safe to include both <time.h> and <sys/time.h>
AC_HEADER_TIME
diff --git a/rts/posix/Select.c b/rts/posix/Select.c
index 46db4054bb..d36e122079 100644
--- a/rts/posix/Select.c
+++ b/rts/posix/Select.c
@@ -17,6 +17,10 @@
#include "Select.h"
#include "AwaitEvent.h"
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# endif
+
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif