summaryrefslogtreecommitdiff
blob: 8c84bf6ce33a40dd04ce1d6bcc83af3ab680c911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<termios.h> is standard as per SUSv2 already:
http://pubs.opengroup.org/onlinepubs/007908799/xsh/termios.h.html
AIX does not provide <sys/termios.h> at all, Linux, Solaris, HP-UX,
Darwin and Interix have both, redirecting one to the other.

--- src/start-stop-daemon.c.orig	2011-03-28 13:55:36 +0200
+++ src/start-stop-daemon.c	2011-03-28 14:50:47 +0200
@@ -37,6 +37,9 @@
 #define NONRETURNING \
 	__attribute__((noreturn))
 
+#define HAVE_TERMIOS_H
+#undef HAVE_SYS_TERMIOS_H
+
 #if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
 #  define OSLinux
 #elif defined(__GNU__)
@@ -97,7 +123,11 @@
 #include <grp.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
-#include <sys/termios.h>
+#if defined(HAVE_TERMIOS_H)
+# include <termios.h>
+#elif defined(HAVE_SYS_TERMIOS_H)
+# include <sys/termios.h>
+#endif
 #include <fcntl.h>
 #include <limits.h>
 #include <assert.h>