summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/libntp/iosignal.c
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2008-08-22 15:58:00 +0000
committerroberto <roberto@FreeBSD.org>2008-08-22 15:58:00 +0000
commitb85c7169a740b2edf0106ad59fdaa1b0160f823c (patch)
tree2b9fb7f64eacb322e95695e412c923e97ba33e88 /contrib/ntp/libntp/iosignal.c
parent1d197cfe9feac6bc29537d8e53c30b6435937b95 (diff)
parent7a6072eb585696f8856cd498c3fd194cf49f14c6 (diff)
downloadFreeBSD-src-b85c7169a740b2edf0106ad59fdaa1b0160f823c.zip
FreeBSD-src-b85c7169a740b2edf0106ad59fdaa1b0160f823c.tar.gz
Merge ntpd & friends 4.2.4p5 from vendor/ntp/dist into head. Next commit
will update usr.sbin/ntp to match this. MFC after: 2 weeks
Diffstat (limited to 'contrib/ntp/libntp/iosignal.c')
-rw-r--r--contrib/ntp/libntp/iosignal.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/contrib/ntp/libntp/iosignal.c b/contrib/ntp/libntp/iosignal.c
index bcad890..19a6e96 100644
--- a/contrib/ntp/libntp/iosignal.c
+++ b/contrib/ntp/libntp/iosignal.c
@@ -3,12 +3,18 @@
* was shamelessly stolen from ntpd.
*/
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-#include "iosignal.h"
+/*
+ * [Bug 158]
+ * Do the #includes differently, as under some versions of Linux
+ * sys/param.h has a #undef CONFIG_PHONE line in it.
+ *
+ * As we have ~40 CONFIG_ variables, I don't feel like renaming them
+ * every time somebody adds a new macro to some system header.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <signal.h>
@@ -25,6 +31,19 @@
# include <ifaddrs.h>
#endif
+# ifdef __QNXNTO__
+# include <fcntl.h>
+# include <unix.h>
+# define FNDELAY O_NDELAY
+# endif
+
+#include "ntp_machine.h"
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_if.h"
+#include "ntp_stdlib.h"
+#include "iosignal.h"
+
#if defined(HAVE_SIGNALED_IO)
static int sigio_block_count = 0;
# if defined(HAVE_SIGACTION)
@@ -68,12 +87,6 @@ extern void input_handler P((l_fp *));
# define USE_SIGIO
# endif
-# ifdef __QNXNTO__
-# include <fcntl.h>
-# include <unix.h>
-# define FNDELAY O_NDELAY
-# endif
-
# if defined(USE_SIGIO) && defined(USE_SIGPOLL)
# if SIGIO == SIGPOLL
# define USE_SIGIO
OpenPOWER on IntegriCloud