Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH] ledmon: Mark as incompatible on musl instead of adding bogus patch
@ 2019-04-24 18:04 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2019-04-24 18:04 UTC (permalink / raw)
  To: openembedded-devel

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>
---
 ...ad-of-on_exit-for-musl-compatibility.patch | 53 -------------------
 meta-oe/recipes-bsp/ledmon/ledmon_git.bb      |  2 +-
 2 files changed, 1 insertion(+), 54 deletions(-)
 delete mode 100644 meta-oe/recipes-bsp/ledmon/ledmon/0001-use-atexit-insead-of-on_exit-for-musl-compatibility.patch

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 @@
-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
-
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
 SYSTEMD_SERVICE_${PN} = "ledmon.service"
 
 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 \
           "
 
 SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f"
 
 COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+COMPATIBLE_HOST_libc-musl = "null"
 
 S = "${WORKDIR}/git"
 EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-24 18:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-24 18:04 [meta-oe][PATCH] ledmon: Mark as incompatible on musl instead of adding bogus patch Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox