diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-11-19 00:10:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-12 23:42:55 +0000 |
commit | 3a0797f51a827d0b3d38921eef136559c191159e (patch) | |
tree | 7367d085651332b10773514247757ec47de9b3cf | |
parent | fd21402148903c1658df56bc9a1fbe032eb39fcc (diff) | |
download | poky-3a0797f51a827d0b3d38921eef136559c191159e.tar.gz |
sysvinit: Fix build with musl
(From OE-Core rev: 8688f08e429dfbc758315f9f07933693269e7c5b)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/realpath.patch | 78 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 1 |
2 files changed, 79 insertions, 0 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/realpath.patch b/meta/recipes-core/sysvinit/sysvinit/realpath.patch new file mode 100644 index 0000000000..5e0dca3bf1 --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit/realpath.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | Fix build on musl use realpath() API its available on all libcs | ||
2 | |||
3 | realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd | ||
4 | However for Linux it should always work | ||
5 | |||
6 | Upstream-Status: Inappropriate[Linux specific] | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | |||
10 | Index: sysvinit-2.88dsf/src/ifdown.c | ||
11 | =================================================================== | ||
12 | --- sysvinit-2.88dsf.orig/src/ifdown.c 2010-03-23 07:37:01.000000000 -0700 | ||
13 | +++ sysvinit-2.88dsf/src/ifdown.c 2014-04-02 00:43:43.675437029 -0700 | ||
14 | @@ -26,11 +26,11 @@ | ||
15 | #include <unistd.h> | ||
16 | #include <time.h> | ||
17 | #include <string.h> | ||
18 | +#include <errno.h> | ||
19 | |||
20 | #include <sys/ioctl.h> | ||
21 | #include <sys/socket.h> | ||
22 | #include <sys/time.h> | ||
23 | -#include <sys/errno.h> | ||
24 | |||
25 | #include <net/if.h> | ||
26 | #include <netinet/in.h> | ||
27 | Index: sysvinit-2.88dsf/src/init.c | ||
28 | =================================================================== | ||
29 | --- sysvinit-2.88dsf.orig/src/init.c 2014-04-02 00:42:10.488770162 -0700 | ||
30 | +++ sysvinit-2.88dsf/src/init.c 2014-04-02 00:42:59.432103823 -0700 | ||
31 | @@ -49,6 +49,7 @@ | ||
32 | #include <utmp.h> | ||
33 | #include <ctype.h> | ||
34 | #include <stdarg.h> | ||
35 | +#include <sys/ttydefaults.h> | ||
36 | #include <sys/syslog.h> | ||
37 | #include <sys/time.h> | ||
38 | |||
39 | Index: sysvinit-2.88dsf/src/mountpoint.c | ||
40 | =================================================================== | ||
41 | --- sysvinit-2.88dsf.orig/src/mountpoint.c 2009-09-10 01:28:49.000000000 -0700 | ||
42 | +++ sysvinit-2.88dsf/src/mountpoint.c 2014-04-02 00:44:18.248770942 -0700 | ||
43 | @@ -23,6 +23,7 @@ | ||
44 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
45 | */ | ||
46 | |||
47 | +#include <sys/types.h> | ||
48 | #include <sys/stat.h> | ||
49 | #include <unistd.h> | ||
50 | #include <stdlib.h> | ||
51 | Index: sysvinit-2.88dsf/src/killall5.c | ||
52 | =================================================================== | ||
53 | --- sysvinit-2.88dsf.orig/src/killall5.c 2014-03-26 00:49:52.982668074 -0700 | ||
54 | +++ sysvinit-2.88dsf/src/killall5.c 2014-04-02 00:46:45.838771653 -0700 | ||
55 | @@ -846,9 +846,9 @@ | ||
56 | char *oargv1, *pargv1; | ||
57 | if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) { | ||
58 | if (o->argv1 && p->argv1) { | ||
59 | - if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL) | ||
60 | + if ((oargv1 = realpath(o->argv1, NULL)) == NULL) | ||
61 | oargv1 = strdup(o->argv1); | ||
62 | - if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL) | ||
63 | + if ((pargv1 = realpath(p->argv1, NULL)) == NULL) | ||
64 | pargv1 = strdup(p->argv1); | ||
65 | if (! strcmp(oargv1, pargv1)) { | ||
66 | ret = 1; | ||
67 | Index: sysvinit-2.88dsf/src/wall.c | ||
68 | =================================================================== | ||
69 | --- sysvinit-2.88dsf.orig/src/wall.c 2009-11-22 14:05:53.000000000 -0800 | ||
70 | +++ sysvinit-2.88dsf/src/wall.c 2014-04-02 00:49:15.258772217 -0700 | ||
71 | @@ -29,6 +29,7 @@ | ||
72 | #include <unistd.h> | ||
73 | #include <pwd.h> | ||
74 | #include <syslog.h> | ||
75 | +#include <time.h> | ||
76 | #include "init.h" | ||
77 | |||
78 | |||
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index 5dfe39e233..e4aa4c37c0 100644 --- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.bz2 \ | |||
14 | file://crypt-lib.patch \ | 14 | file://crypt-lib.patch \ |
15 | file://pidof-add-m-option.patch \ | 15 | file://pidof-add-m-option.patch \ |
16 | file://0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch \ | 16 | file://0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch \ |
17 | file://realpath.patch \ | ||
17 | file://rcS-default \ | 18 | file://rcS-default \ |
18 | file://rc \ | 19 | file://rc \ |
19 | file://rcS \ | 20 | file://rcS \ |