tools: Improve watchgnupg portability.
authorWerner Koch <wk@gnupg.org>
Mon, 1 Dec 2014 14:55:28 +0000 (15:55 +0100)
committerWerner Koch <wk@gnupg.org>
Mon, 1 Dec 2014 14:55:28 +0000 (15:55 +0100)
* configure.ac (AC_CHECK_HEADERS): Check for sys.select.h
* tools/watchgnupg.c: Include it.
--

It seems http://www.musl-libc.org/ is quite limited and requires
the use sys/select.h instead of unistd.h et al.

configure.ac
tools/watchgnupg.c

index 95711cb..4ea0bbe 100644 (file)
@@ -1190,7 +1190,7 @@ fi
 AC_MSG_NOTICE([checking for header files])
 AC_HEADER_STDC
 AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h \
-                  pty.h utmp.h pwd.h inttypes.h signal.h])
+                  pty.h utmp.h pwd.h inttypes.h signal.h sys/select.h])
 AC_HEADER_TIME
 
 
index 4f4d54d..8ad2a13 100644 (file)
@@ -34,6 +34,9 @@
 #include <arpa/inet.h>
 #include <fcntl.h>
 #include <time.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
 
 #define PGM "watchgnupg"