1 From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Wed, 30 Dec 2015 01:01:15 +0000
4 Subject: [PATCH] Fix build issues found with non glibc C libraries
6 Add time.h for getting time_t definition
8 linux/param.h for EXEC_PAGESIZE
9 Replace deprecated MNTTAB with _PATH_MNTTAB
10 include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
12 Include sys/types.h for u_char definition
14 Signed-off-by: Khem Raj <raj.khem@gmail.com>
17 Upstream-Status: Submitted
19 include/extern.h | 1 +
20 src/configfile.c | 1 +
23 src/shutdown.c | 3 ++-
24 5 files changed, 8 insertions(+), 1 deletion(-)
26 diff --git a/include/extern.h b/include/extern.h
27 index 21db11b..04b16bc 100644
28 --- a/include/extern.h
29 +++ b/include/extern.h
32 #include <netinet/in.h>
36 #include "logmessage.h"
38 diff --git a/src/configfile.c b/src/configfile.c
39 index be5d7b3..7c1d1dd 100644
40 --- a/src/configfile.c
41 +++ b/src/configfile.c
50 diff --git a/src/memory.c b/src/memory.c
51 index e9607e4..b5e08aa 100644
56 #include <sys/param.h>
59 +#include <linux/param.h>
63 #include "watch_err.h"
64 diff --git a/src/net.c b/src/net.c
65 index 21823ae..8930caf 100644
70 #include <unistd.h> /* for gethostname() etc */
71 #include <netdb.h> /* for gethostbyname() */
72 +#include <sys/types.h>
73 #include <sys/param.h> /* for MAXHOSTNAMELEN */
74 #include <sys/socket.h>
75 #include <netinet/in.h>
76 diff --git a/src/shutdown.c b/src/shutdown.c
77 index 74aafa5..46b99cf 100644
82 #include "watch_err.h"
84 +#include "ext2_mnt.h"
88 @@ -123,7 +124,7 @@ static void mnt_off()
92 - fp = setmntent(MNTTAB, "r");
93 + fp = setmntent(_PATH_MNTTAB, "r");
94 /* in some rare cases fp might be NULL so be careful */
95 while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
96 /* First check if swap */