diff options
author | Adrian Bunk <bunk@stusta.de> | 2019-04-24 21:04:48 +0300 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-04-29 10:13:56 -0700 |
commit | 67b5700da78c60326f2c02dfe9c99eef3096810a (patch) | |
tree | 0e7cea4a026514fae547e472cdc71f2d43708b9c | |
parent | 3ebc4b615a6180352d7a90fb5b5f6db81fab9d1c (diff) | |
download | meta-openembedded-67b5700da78c60326f2c02dfe9c99eef3096810a.tar.gz |
ledmon: Mark as incompatible on musl instead of adding bogus patch
atexit is not a drop-in replacement for on_exit,
mark as incompatible with musl instead of adding
a broken patch.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-bsp/ledmon/ledmon/0001-use-atexit-insead-of-on_exit-for-musl-compatibility.patch | 53 | ||||
-rw-r--r-- | meta-oe/recipes-bsp/ledmon/ledmon_git.bb | 2 |
2 files changed, 1 insertions, 54 deletions
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon/0001-use-atexit-insead-of-on_exit-for-musl-compatibility.patch b/meta-oe/recipes-bsp/ledmon/ledmon/0001-use-atexit-insead-of-on_exit-for-musl-compatibility.patch deleted file mode 100644 index de5ce9fc8..000000000 --- a/meta-oe/recipes-bsp/ledmon/ledmon/0001-use-atexit-insead-of-on_exit-for-musl-compatibility.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 8aba09b743b4e89ef581a679943ce39a5c7fd4a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 9 Apr 2019 21:25:21 -0700 | ||
4 | Subject: [PATCH 1/2] use atexit insead of on_exit for musl compatibility | ||
5 | |||
6 | musl does not support on_exit which is used in clean up. | ||
7 | Instead use atexit with is supported by musl and glibc. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/ledctl.c | 2 +- | ||
13 | src/ledmon.c | 4 ++-- | ||
14 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/src/ledctl.c b/src/ledctl.c | ||
17 | index 2aa1abc..2c97dcf 100644 | ||
18 | --- a/src/ledctl.c | ||
19 | +++ b/src/ledctl.c | ||
20 | @@ -689,7 +689,7 @@ int main(int argc, char *argv[]) | ||
21 | status = _init_ledctl_conf(); | ||
22 | if (status != STATUS_SUCCESS) | ||
23 | return status; | ||
24 | - if (on_exit(_ledctl_fini, progname)) | ||
25 | + if (atexit(_ledctl_fini)) | ||
26 | exit(STATUS_ONEXIT_ERROR); | ||
27 | if (_cmdline_parse(argc, argv)) | ||
28 | exit(STATUS_CMDLINE_ERROR); | ||
29 | diff --git a/src/ledmon.c b/src/ledmon.c | ||
30 | index 0ea2583..2333c7c 100644 | ||
31 | --- a/src/ledmon.c | ||
32 | +++ b/src/ledmon.c | ||
33 | @@ -860,7 +860,7 @@ int main(int argc, char *argv[]) | ||
34 | set_invocation_name(argv[0]); | ||
35 | openlog(progname, LOG_PID | LOG_PERROR, LOG_DAEMON); | ||
36 | |||
37 | - if (on_exit(_ledmon_status, &terminate)) | ||
38 | + if (atexit(_ledmon_status)) | ||
39 | return STATUS_ONEXIT_ERROR; | ||
40 | |||
41 | if (_cmdline_parse_non_daemonise(argc, argv) != STATUS_SUCCESS) | ||
42 | @@ -930,7 +930,7 @@ int main(int argc, char *argv[]) | ||
43 | } | ||
44 | _ledmon_setup_signals(); | ||
45 | |||
46 | - if (on_exit(_ledmon_fini, progname)) | ||
47 | + if (atexit(_ledmon_fini)) | ||
48 | exit(STATUS_ONEXIT_ERROR); | ||
49 | list_init(&ledmon_block_list, (item_free_t)block_device_fini); | ||
50 | sysfs_init(); | ||
51 | -- | ||
52 | 2.21.0 | ||
53 | |||
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb index 4376ad394..74ae56c67 100644 --- a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb +++ b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb | |||
@@ -16,13 +16,13 @@ inherit systemd | |||
16 | SYSTEMD_SERVICE_${PN} = "ledmon.service" | 16 | SYSTEMD_SERVICE_${PN} = "ledmon.service" |
17 | 17 | ||
18 | SRC_URI = "git://github.com/intel/ledmon;branch=master \ | 18 | SRC_URI = "git://github.com/intel/ledmon;branch=master \ |
19 | file://0001-use-atexit-insead-of-on_exit-for-musl-compatibility.patch \ | ||
20 | file://0002-include-sys-select.h-and-sys-types.h.patch \ | 19 | file://0002-include-sys-select.h-and-sys-types.h.patch \ |
21 | " | 20 | " |
22 | 21 | ||
23 | SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f" | 22 | SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f" |
24 | 23 | ||
25 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | 24 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" |
25 | COMPATIBLE_HOST_libc-musl = "null" | ||
26 | 26 | ||
27 | S = "${WORKDIR}/git" | 27 | S = "${WORKDIR}/git" |
28 | EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'" | 28 | EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'" |