diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch b/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch new file mode 100644 index 0000000000..35599d44c2 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 3ca5326485cb19e775af6de615c17be66e44e472 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 24 Oct 2017 23:08:24 -0700 | ||
4 | Subject: [PATCH] Define _PATH_WTMPX and _PATH_UTMPX if not defined | ||
5 | |||
6 | Musl needs these defines | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | Upstream-Status: Pending | ||
11 | |||
12 | src/shared/utmp-wtmp.c | 8 ++++++++ | ||
13 | 1 file changed, 8 insertions(+) | ||
14 | |||
15 | diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c | ||
16 | index 9750dcd81..bd55d74a1 100644 | ||
17 | --- a/src/shared/utmp-wtmp.c | ||
18 | +++ b/src/shared/utmp-wtmp.c | ||
19 | @@ -27,6 +27,7 @@ | ||
20 | #include <sys/time.h> | ||
21 | #include <sys/utsname.h> | ||
22 | #include <unistd.h> | ||
23 | +#include <utmp.h> | ||
24 | #include <utmpx.h> | ||
25 | |||
26 | #include "alloc-util.h" | ||
27 | @@ -41,6 +42,13 @@ | ||
28 | #include "util.h" | ||
29 | #include "utmp-wtmp.h" | ||
30 | |||
31 | +#if defined _PATH_UTMP && !defined _PATH_UTMPX | ||
32 | +# define _PATH_UTMPX _PATH_UTMP | ||
33 | +#endif | ||
34 | +#if defined _PATH_WTMP && !defined _PATH_WTMPX | ||
35 | +# define _PATH_WTMPX _PATH_WTMP | ||
36 | +#endif | ||
37 | + | ||
38 | int utmp_get_runlevel(int *runlevel, int *previous) { | ||
39 | struct utmpx *found, lookup = { .ut_type = RUN_LVL }; | ||
40 | int r; | ||
41 | -- | ||
42 | 2.14.3 | ||
43 | |||