mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
linux-atm: Replace bogus on_exit removal with musl-specific hack
Functions registered by atexit and on_exit have different signatures, if registered with atexit no parameters are passed. The function only prints a trace on nonzero exit(), so can safely be disabled in musl builds. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
-30
@@ -1,30 +0,0 @@
|
|||||||
From 27fa80dc8045e71c30dd2abea835206d5c8f6c71 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
|
||||||
Date: Sat, 17 Jun 2017 16:18:56 -0700
|
|
||||||
Subject: [PATCH 2/3] sigd: Replace on_exit() API with atexit()
|
|
||||||
|
|
||||||
on_exit is not universally available
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
||||||
---
|
|
||||||
src/sigd/atmsigd.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/sigd/atmsigd.c b/src/sigd/atmsigd.c
|
|
||||||
index 52e41c7..b766606 100644
|
|
||||||
--- a/src/sigd/atmsigd.c
|
|
||||||
+++ b/src/sigd/atmsigd.c
|
|
||||||
@@ -517,7 +517,7 @@ int main(int argc,char **argv)
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- (void) on_exit(trace_on_exit,NULL);
|
|
||||||
+ atexit(trace_on_exit);
|
|
||||||
poll_loop();
|
|
||||||
close_all();
|
|
||||||
for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
|
|
||||||
--
|
|
||||||
2.13.1
|
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
Description: musl lacks on_exit
|
||||||
|
Author: Adrian Bunk <bunk@stusta.de>
|
||||||
|
|
||||||
|
Only prints a trace on nonzero exit(),
|
||||||
|
so can safely be disabled in musl builds.
|
||||||
|
|
||||||
|
Signed-off-by: Adrian Bunk <bunk@stusta.de>
|
||||||
|
Upstream-Status: Inappropriate [musl specific]
|
||||||
|
|
||||||
|
--- linux-atm-2.5.1.orig/src/sigd/atmsigd.c
|
||||||
|
+++ linux-atm-2.5.1/src/sigd/atmsigd.c
|
||||||
|
@@ -283,6 +283,7 @@ static void setup_signals(void)
|
||||||
|
/* ------------------------------- main ... ------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
static void trace_on_exit(int status,void *dummy)
|
||||||
|
{
|
||||||
|
char path[PATH_MAX+1];
|
||||||
|
@@ -300,6 +301,7 @@ static void trace_on_exit(int status,voi
|
||||||
|
dump_trace(file,"Message trace (after error exit)");
|
||||||
|
if (file != stderr) (void) fclose(file);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
|
||||||
|
static void manual_override(void)
|
||||||
|
@@ -517,7 +519,9 @@ int main(int argc,char **argv)
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#if 0
|
||||||
|
(void) on_exit(trace_on_exit,NULL);
|
||||||
|
+#endif
|
||||||
|
poll_loop();
|
||||||
|
close_all();
|
||||||
|
for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
|
||||||
@@ -10,11 +10,12 @@ SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${P
|
|||||||
file://install-from-buildir.patch \
|
file://install-from-buildir.patch \
|
||||||
file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \
|
file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \
|
||||||
file://0001-ttcp-Add-printf-format-string.patch \
|
file://0001-ttcp-Add-printf-format-string.patch \
|
||||||
file://0002-sigd-Replace-on_exit-API-with-atexit.patch \
|
|
||||||
file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
|
file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
|
||||||
file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \
|
file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
SRC_URI_append_libc-musl = " file://musl-no-on_exit.patch"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8"
|
SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8"
|
||||||
SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a"
|
SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user