From ce24cbd045b2a93a04c5cd258137ab8572f2c429 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 21 Dec 2009 16:17:48 -0500 Subject: [PATCH] check more headers before including them --- configure.ac | 3 ++- obt/mainloop.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 379440a2..aa575657 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,8 @@ AM_GNU_GETTEXT_VERSION(0.15) AM_GNU_GETTEXT([external]) AC_CHECK_HEADERS(ctype.h fcntl.h locale.h signal.h string.h stdio.h stdlib.h) -AC_CHECK_HEADERS(unistd.h sys/stat.h sys/select.h sys/time.h sys/wait.h) +AC_CHECK_HEADERS(unistd.h sys/stat.h sys/select.h sys/socket.h sys/time.h) +AC_CHECK_HEADERS(sys/wait.h) # AC_HEADER_TIME # AC_TYPE_SIGNAL diff --git a/obt/mainloop.c b/obt/mainloop.c index 691c6875..bf866aec 100644 --- a/obt/mainloop.c +++ b/obt/mainloop.c @@ -21,10 +21,21 @@ #include "obt/display.h" #include "obt/util.h" +#ifdef HAVE_STDIO_H #include +#endif +#ifdef HAVE_STDLIB_H #include +#endif +#ifdef HAVE_SYS_SELECT_H #include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SIGNAL_H #include +#endif typedef struct _ObtMainLoopTimer ObtMainLoopTimer; typedef struct _ObtMainLoopSignal ObtMainLoopSignal; -- 2.45.2