]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
Portability fixes: conditionally include sys/select.h, include sys/types.h
authorjorton <jorton>
Tue, 11 Jun 2002 13:15:33 +0000 (13:15 +0000)
committerjorton <jorton>
Tue, 11 Jun 2002 13:15:33 +0000 (13:15 +0000)
first.

config.h.in
configure.in
form.c

index d2d5e7aad9d9f335853660c21570411da1b13b34..9fbcdf44c7e0fac9a757427dd282eef8411d44fa 100644 (file)
@@ -3,6 +3,9 @@
 /* Define if you have the <alloca.h> header file.  */
 #undef HAVE_ALLOCA_H
 
+/* Define if you have the <sys/select.h> header file.  */
+#undef HAVE_SYS_SELECT_H
+
 /* Define to 1 if GPM support is enabled */
 #undef USE_GPM
 
index 446fa86ebc2285b524f01d4f481f033d1c700fac..7043e6326f8becb24bf993352a6902b0191cd76f 100644 (file)
@@ -13,7 +13,7 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LN_S
 
-AC_CHECK_HEADERS(alloca.h)
+AC_CHECK_HEADERS(sys/select.h alloca.h)
 
 AC_ARG_WITH(gpm-support, [  --with-gpm-support         Compile with GPM support])
 
diff --git a/form.c b/form.c
index 2d95d2aefa783d0adfafd67ec31e779ee34b09c9..5564a748019488b31fc183cb6cb4d8825e2633de 100644 (file)
--- a/form.c
+++ b/form.c
@@ -1,15 +1,18 @@
 #include "config.h"
 
+#include <sys/types.h>
+
 #include <slang.h>
 #include <stdarg.h>
 #include <stdlib.h>
+#ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#endif
 #include <sys/time.h>
 
 #ifdef USE_GPM
 #include <ctype.h>
 #include <sys/time.h>      /* timeval */
-#include <sys/types.h>     /* socket() */
 #include <sys/socket.h>    /* socket() */
 #include <sys/un.h>        /* struct sockaddr_un */
 #include <sys/fcntl.h>     /* O_RDONLY */