mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-02 04:32:24 +00:00
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>
This commit is contained in:
parent
3ebc4b615a
commit
67b5700da7
@ -1,53 +0,0 @@
|
|||||||
From 8aba09b743b4e89ef581a679943ce39a5c7fd4a5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
|
||||||
Date: Tue, 9 Apr 2019 21:25:21 -0700
|
|
||||||
Subject: [PATCH 1/2] use atexit insead of on_exit for musl compatibility
|
|
||||||
|
|
||||||
musl does not support on_exit which is used in clean up.
|
|
||||||
Instead use atexit with is supported by musl and glibc.
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
||||||
---
|
|
||||||
src/ledctl.c | 2 +-
|
|
||||||
src/ledmon.c | 4 ++--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/ledctl.c b/src/ledctl.c
|
|
||||||
index 2aa1abc..2c97dcf 100644
|
|
||||||
--- a/src/ledctl.c
|
|
||||||
+++ b/src/ledctl.c
|
|
||||||
@@ -689,7 +689,7 @@ int main(int argc, char *argv[])
|
|
||||||
status = _init_ledctl_conf();
|
|
||||||
if (status != STATUS_SUCCESS)
|
|
||||||
return status;
|
|
||||||
- if (on_exit(_ledctl_fini, progname))
|
|
||||||
+ if (atexit(_ledctl_fini))
|
|
||||||
exit(STATUS_ONEXIT_ERROR);
|
|
||||||
if (_cmdline_parse(argc, argv))
|
|
||||||
exit(STATUS_CMDLINE_ERROR);
|
|
||||||
diff --git a/src/ledmon.c b/src/ledmon.c
|
|
||||||
index 0ea2583..2333c7c 100644
|
|
||||||
--- a/src/ledmon.c
|
|
||||||
+++ b/src/ledmon.c
|
|
||||||
@@ -860,7 +860,7 @@ int main(int argc, char *argv[])
|
|
||||||
set_invocation_name(argv[0]);
|
|
||||||
openlog(progname, LOG_PID | LOG_PERROR, LOG_DAEMON);
|
|
||||||
|
|
||||||
- if (on_exit(_ledmon_status, &terminate))
|
|
||||||
+ if (atexit(_ledmon_status))
|
|
||||||
return STATUS_ONEXIT_ERROR;
|
|
||||||
|
|
||||||
if (_cmdline_parse_non_daemonise(argc, argv) != STATUS_SUCCESS)
|
|
||||||
@@ -930,7 +930,7 @@ int main(int argc, char *argv[])
|
|
||||||
}
|
|
||||||
_ledmon_setup_signals();
|
|
||||||
|
|
||||||
- if (on_exit(_ledmon_fini, progname))
|
|
||||||
+ if (atexit(_ledmon_fini))
|
|
||||||
exit(STATUS_ONEXIT_ERROR);
|
|
||||||
list_init(&ledmon_block_list, (item_free_t)block_device_fini);
|
|
||||||
sysfs_init();
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
||||||
@ -16,13 +16,13 @@ inherit systemd
|
|||||||
SYSTEMD_SERVICE_${PN} = "ledmon.service"
|
SYSTEMD_SERVICE_${PN} = "ledmon.service"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/intel/ledmon;branch=master \
|
SRC_URI = "git://github.com/intel/ledmon;branch=master \
|
||||||
file://0001-use-atexit-insead-of-on_exit-for-musl-compatibility.patch \
|
|
||||||
file://0002-include-sys-select.h-and-sys-types.h.patch \
|
file://0002-include-sys-select.h-and-sys-types.h.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f"
|
SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f"
|
||||||
|
|
||||||
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
|
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
|
||||||
|
COMPATIBLE_HOST_libc-musl = "null"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
|
EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user