From 0367a4b8cfbf1f197e093ca2b83b27e0a409c3c7 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 1 Dec 2014 15:55:28 +0100 Subject: [PATCH] tools: Improve watchgnupg portability. * 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 | 2 +- tools/watchgnupg.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 95711cb8f..4ea0bbeb8 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/tools/watchgnupg.c b/tools/watchgnupg.c index 4f4d54db2..8ad2a13e3 100644 --- a/tools/watchgnupg.c +++ b/tools/watchgnupg.c @@ -34,6 +34,9 @@ #include #include #include +#ifdef HAVE_SYS_SELECT_H +# include +#endif #define PGM "watchgnupg"