diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-08-31 16:26:44 -0700 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-09-12 10:55:07 -0400 |
commit | 3f8e49845026ad14aabba76685540e40b8e57b70 (patch) | |
tree | a2bbf3174cf5a1ad33df497f504f92abe300792d /meta-networking/recipes-netkit | |
parent | 2db3fdcc95a52a4f9aad45a47e15d2b8a0a445aa (diff) | |
download | meta-openembedded-3f8e49845026ad14aabba76685540e40b8e57b70.tar.gz |
netkit-rwho: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-netkit')
3 files changed, 120 insertions, 1 deletions
diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch new file mode 100644 index 000000000..b1325b317 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 55ab6f1389261edff5f4c942bc3b0d8e695856d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 30 Aug 2017 18:11:33 -0700 | ||
4 | Subject: [PATCH 1/2] Add missing include path to -I options | ||
5 | |||
6 | Fixes errors like | ||
7 | | rwho.c:52:10: fatal error: 'protocols/rwhod.h' file not found | ||
8 | | #include <protocols/rwhod.h> | ||
9 | | ^~~~~~~~~~~~~~~~~~~ | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | Upstream-Status: Pending | ||
14 | |||
15 | rwho/Makefile | 1 + | ||
16 | rwhod/Makefile | 2 ++ | ||
17 | 2 files changed, 3 insertions(+) | ||
18 | |||
19 | diff --git a/rwho/Makefile b/rwho/Makefile | ||
20 | index 6f86388..67b28d4 100644 | ||
21 | --- a/rwho/Makefile | ||
22 | +++ b/rwho/Makefile | ||
23 | @@ -6,6 +6,7 @@ include ../MRULES | ||
24 | rwho: rwho.o | ||
25 | $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ | ||
26 | |||
27 | +CFLAGS += -I../include | ||
28 | rwho.o: ../version.h | ||
29 | |||
30 | install: rwho | ||
31 | diff --git a/rwhod/Makefile b/rwhod/Makefile | ||
32 | index 772b641..9034218 100644 | ||
33 | --- a/rwhod/Makefile | ||
34 | +++ b/rwhod/Makefile | ||
35 | @@ -7,6 +7,8 @@ ifneq ($(USE_GLIBC),1) | ||
36 | CFLAGS += -D_GNU_SOURCE | ||
37 | endif | ||
38 | |||
39 | +CFLAGS += -I../include | ||
40 | + | ||
41 | OBJS = rwhod.o | ||
42 | |||
43 | rwhod: $(OBJS) | ||
44 | -- | ||
45 | 2.14.1 | ||
46 | |||
diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch new file mode 100644 index 000000000..717b4d73f --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | From 2108213242638fa355f662382f55495d91301858 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 30 Aug 2017 18:13:17 -0700 | ||
4 | Subject: [PATCH 2/2] Fix build issues found with musl | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | ruptime/ruptime.c | 1 + | ||
11 | rwho/rwho.c | 1 + | ||
12 | rwhod/rwhod.c | 5 +++-- | ||
13 | 3 files changed, 5 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/ruptime/ruptime.c b/ruptime/ruptime.c | ||
16 | index 1d4f7b6..f1f043c 100644 | ||
17 | --- a/ruptime/ruptime.c | ||
18 | +++ b/ruptime/ruptime.c | ||
19 | @@ -53,6 +53,7 @@ char ruptime_rcsid[] = | ||
20 | #include <string.h> | ||
21 | #include <errno.h> | ||
22 | #include <time.h> | ||
23 | +#include <fcntl.h> | ||
24 | |||
25 | struct hs { | ||
26 | char hs_hostname[MAXHOSTNAMELEN]; | ||
27 | diff --git a/rwho/rwho.c b/rwho/rwho.c | ||
28 | index 63919ac..71aec9e 100644 | ||
29 | --- a/rwho/rwho.c | ||
30 | +++ b/rwho/rwho.c | ||
31 | @@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/08/01 20:44:18 dholland Exp $"; | ||
32 | #include <assert.h> | ||
33 | #include <stdio.h> | ||
34 | #include <time.h> | ||
35 | +#include <fcntl.h> | ||
36 | #include <protocols/rwhod.h> | ||
37 | |||
38 | #include "../version.h" | ||
39 | diff --git a/rwhod/rwhod.c b/rwhod/rwhod.c | ||
40 | index 54498d0..40cabcf 100644 | ||
41 | --- a/rwhod/rwhod.c | ||
42 | +++ b/rwhod/rwhod.c | ||
43 | @@ -76,6 +76,7 @@ char rcsid[] = | ||
44 | #include <grp.h> | ||
45 | #include <time.h> | ||
46 | #include <stdint.h> | ||
47 | +#include <fcntl.h> | ||
48 | |||
49 | #include "../version.h" | ||
50 | |||
51 | @@ -102,7 +103,7 @@ struct nlist nl[] = { | ||
52 | static void broadcaster(void); | ||
53 | static int configure(int s); | ||
54 | static int verify(const char *name); | ||
55 | -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) | ||
56 | +#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)) | ||
57 | static int getloadavg(double ptr[3], int n); | ||
58 | #endif | ||
59 | |||
60 | @@ -549,7 +550,7 @@ sendpacket(struct whod *wd) | ||
61 | } | ||
62 | } | ||
63 | |||
64 | -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) | ||
65 | +#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)) | ||
66 | /* | ||
67 | * Taken from: | ||
68 | * | ||
69 | -- | ||
70 | 2.14.1 | ||
71 | |||
diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb index 04baa4286..5685f03d6 100644 --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb | |||
@@ -8,7 +8,9 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;nam | |||
8 | ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;name=patch13 \ | 8 | ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;name=patch13 \ |
9 | file://rwhod \ | 9 | file://rwhod \ |
10 | file://rwhod.default \ | 10 | file://rwhod.default \ |
11 | " | 11 | file://0001-Add-missing-include-path-to-I-options.patch \ |
12 | file://0002-Fix-build-issues-found-with-musl.patch \ | ||
13 | " | ||
12 | SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75" | 14 | SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75" |
13 | SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7" | 15 | SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7" |
14 | SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9" | 16 | SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9" |