diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-07-22 00:26:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-23 22:26:28 +0100 |
commit | f24ef905ed7e29a1a0e1b8f29f45397d8d6238d0 (patch) | |
tree | d827f7270cfcc7d52b8a0b30df746cc2d07c32ab /meta | |
parent | bbd5d098eca400e2b87da0d42623115319fa5906 (diff) | |
download | poky-f24ef905ed7e29a1a0e1b8f29f45397d8d6238d0.tar.gz |
sysvinit: Include sys/sysmacros.h for major/minor definitions on musl too
Fixes musl issue
implicit declaration of function 'minor' is invalid in C99 [-Wimplicit-function-declaration]
which eventually ends up with a linker error
(From OE-Core rev: 6b603924e50a5694421b9142494315799422928d)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch | 99 |
1 files changed, 39 insertions, 60 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch b/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch index 2575b59b5e..e13ac9d06b 100644 --- a/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch +++ b/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch | |||
@@ -1,71 +1,50 @@ | |||
1 | From 29c7a529d3bb0c1e20239f885e74c5036f1a908c Mon Sep 17 00:00:00 2001 | 1 | From 3c29a86f351ea4827dc445bb8e6cb774543c9be6 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 6 Aug 2018 15:38:58 -0700 | 3 | Date: Mon, 6 Aug 2018 15:38:58 -0700 |
4 | Subject: [PATCH] include sys/sysmacros.h for major/minor defines in glibc | 4 | Subject: [PATCH] include sys/sysmacros.h for major/minor definitions |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | Upstream-Status: Pending | 7 | Upstream-Status: Pending |
8 | |||
8 | --- | 9 | --- |
9 | src/bootlogd.c | 3 +++ | 10 | src/bootlogd.c | 1 + |
10 | src/bootlogd.o | Bin 58448 -> 60376 bytes | 11 | src/mountpoint.c | 1 + |
11 | src/dowall.c | 3 +++ | 12 | src/shutdown.c | 1 + |
12 | src/shutdown.c | 4 +++- | 13 | 3 files changed, 3 insertions(+) |
13 | 4 files changed, 9 insertions(+), 1 deletion(-) | ||
14 | 14 | ||
15 | Index: sysvinit-2.88dsf/src/bootlogd.c | 15 | diff --git a/src/bootlogd.c b/src/bootlogd.c |
16 | =================================================================== | 16 | index 570d382..68d62f3 100644 |
17 | --- sysvinit-2.88dsf.orig/src/bootlogd.c | 17 | --- a/src/bootlogd.c |
18 | +++ sysvinit-2.88dsf/src/bootlogd.c | 18 | +++ b/src/bootlogd.c |
19 | @@ -53,6 +53,9 @@ | 19 | @@ -35,6 +35,7 @@ |
20 | #ifdef __linux__ | 20 | #include <sys/types.h> |
21 | #include <sys/mount.h> | 21 | #include <sys/time.h> |
22 | #endif | 22 | #include <sys/stat.h> |
23 | +#ifdef __GLIBC__ | ||
24 | +#include <sys/sysmacros.h> | ||
25 | +#endif | ||
26 | |||
27 | char *Version = "@(#) bootlogd 2.86 03-Jun-2004 miquels@cistron.nl"; | ||
28 | |||
29 | Index: sysvinit-2.88dsf/src/dowall.c | ||
30 | =================================================================== | ||
31 | --- sysvinit-2.88dsf.orig/src/dowall.c | ||
32 | +++ sysvinit-2.88dsf/src/dowall.c | ||
33 | @@ -37,6 +37,9 @@ | ||
34 | #include <signal.h> | ||
35 | #include <setjmp.h> | ||
36 | #include <paths.h> | ||
37 | +#ifdef __GLIBC__ | ||
38 | +#include <sys/sysmacros.h> | 23 | +#include <sys/sysmacros.h> |
39 | +#endif | 24 | #include <sys/ioctl.h> |
25 | #include <sys/utsname.h> | ||
26 | #include <time.h> | ||
27 | diff --git a/src/mountpoint.c b/src/mountpoint.c | ||
28 | index 9e3dd9c..91f74ed 100644 | ||
29 | --- a/src/mountpoint.c | ||
30 | +++ b/src/mountpoint.c | ||
31 | @@ -25,6 +25,7 @@ | ||
40 | 32 | ||
41 | #ifndef _PATH_DEV | 33 | #include <sys/types.h> |
42 | # define _PATH_DEV "/dev/" | 34 | #include <sys/stat.h> |
43 | Index: sysvinit-2.88dsf/src/shutdown.c | ||
44 | =================================================================== | ||
45 | --- sysvinit-2.88dsf.orig/src/shutdown.c | ||
46 | +++ sysvinit-2.88dsf/src/shutdown.c | ||
47 | @@ -57,7 +57,9 @@ | ||
48 | #include "reboot.h" | ||
49 | #include "initreq.h" | ||
50 | #include "init.h" | ||
51 | - | ||
52 | +#ifdef __GLIBC__ | ||
53 | +#include <sys/sysmacros.h> | 35 | +#include <sys/sysmacros.h> |
54 | +#endif | 36 | #include <unistd.h> |
55 | 37 | #include <stdlib.h> | |
56 | char *Version = "@(#) shutdown 2.86-1 31-Jul-2004 miquels@cistron.nl"; | 38 | #include <string.h> |
57 | 39 | diff --git a/src/shutdown.c b/src/shutdown.c | |
58 | Index: sysvinit-2.88dsf/src/mountpoint.c | 40 | index 7e997da..17de58d 100644 |
59 | =================================================================== | 41 | --- a/src/shutdown.c |
60 | --- sysvinit-2.88dsf.orig/src/mountpoint.c | 42 | +++ b/src/shutdown.c |
61 | +++ sysvinit-2.88dsf/src/mountpoint.c | 43 | @@ -40,6 +40,7 @@ |
62 | @@ -32,6 +32,9 @@ | 44 | #endif |
63 | #include <stdarg.h> | 45 | #include <sys/types.h> |
64 | #include <getopt.h> | 46 | #include <sys/stat.h> |
65 | #include <stdio.h> | ||
66 | +#ifdef __GLIBC__ | ||
67 | +#include <sys/sysmacros.h> | 47 | +#include <sys/sysmacros.h> |
68 | +#endif | 48 | #include <sys/wait.h> |
69 | 49 | #include <time.h> | |
70 | int dostat(char *path, struct stat *st, int do_lstat, int quiet) | 50 | #include <string.h> |
71 | { | ||