summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch99
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.14.bb8
2 files changed, 106 insertions, 1 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch b/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
new file mode 100644
index 0000000000..8afed5c0db
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
@@ -0,0 +1,99 @@
1From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 30 Dec 2015 01:01:15 +0000
4Subject: [PATCH] Fix build issues found with non glibc C libraries
5
6Add time.h for getting time_t definition
7limits.h for PATH_MAX
8linux/param.h for EXEC_PAGESIZE
9Replace deprecated MNTTAB with _PATH_MNTTAB
10include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
11MNTTYPE_EXT2
12Include sys/types.h for u_char definition
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16
17Upstream-Status: Submitted
18
19 include/extern.h | 1 +
20 src/configfile.c | 1 +
21 src/memory.c | 3 +++
22 src/net.c | 1 +
23 src/shutdown.c | 3 ++-
24 5 files changed, 8 insertions(+), 1 deletion(-)
25
26diff --git a/include/extern.h b/include/extern.h
27index 21db11b..04b16bc 100644
28--- a/include/extern.h
29+++ b/include/extern.h
30@@ -3,6 +3,7 @@
31
32 #include <netinet/in.h>
33 #include <stdio.h>
34+#include <time.h>
35
36 #include "logmessage.h"
37 #include "xmalloc.h"
38diff --git a/src/configfile.c b/src/configfile.c
39index be5d7b3..7c1d1dd 100644
40--- a/src/configfile.c
41+++ b/src/configfile.c
42@@ -16,6 +16,7 @@
43 #include <errno.h>
44 #include <string.h>
45 #include <dirent.h>
46+#include <limits.h>
47 #include <sys/stat.h>
48
49 #include "extern.h"
50diff --git a/src/memory.c b/src/memory.c
51index e9607e4..b5e08aa 100644
52--- a/src/memory.c
53+++ b/src/memory.c
54@@ -21,6 +21,9 @@
55 #include <sys/stat.h>
56 #include <sys/param.h>
57 #include <sys/mman.h>
58+#ifdef __linux__
59+#include <linux/param.h>
60+#endif
61
62 #include "extern.h"
63 #include "watch_err.h"
64diff --git a/src/net.c b/src/net.c
65index 21823ae..8930caf 100644
66--- a/src/net.c
67+++ b/src/net.c
68@@ -17,6 +17,7 @@
69 #include <string.h>
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>
76diff --git a/src/shutdown.c b/src/shutdown.c
77index 74aafa5..46b99cf 100644
78--- a/src/shutdown.c
79+++ b/src/shutdown.c
80@@ -25,6 +25,7 @@
81
82 #include "watch_err.h"
83 #include "extern.h"
84+#include "ext2_mnt.h"
85
86 #if defined __GLIBC__
87 #include "ext2_mnt.h"
88@@ -123,7 +124,7 @@ static void mnt_off()
89 FILE *fp;
90 struct mntent *mnt;
91
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 */
97--
982.6.4
99
diff --git a/meta/recipes-extended/watchdog/watchdog_5.14.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb
index 9cb89d586c..fc717bc53d 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.14.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -12,7 +12,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
12 file://fixsepbuild.patch \ 12 file://fixsepbuild.patch \
13 file://fix-ping-failure.patch \ 13 file://fix-ping-failure.patch \
14 file://watchdog-init.patch \ 14 file://watchdog-init.patch \
15 file://watchdog-conf.patch" 15 file://watchdog-conf.patch \
16 file://0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch \
17"
16 18
17SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4" 19SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
18SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1" 20SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
@@ -23,6 +25,10 @@ UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
23inherit autotools 25inherit autotools
24inherit update-rc.d 26inherit update-rc.d
25 27
28DEPENDS_append_libc-musl = " libtirpc "
29CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
30LDFLAGS_append_libc-musl = " -ltirpc "
31
26INITSCRIPT_NAME = "watchdog.sh" 32INITSCRIPT_NAME = "watchdog.sh"
27INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ." 33INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
28 34