diff options
author | Adrian Bunk <bunk@stusta.de> | 2019-04-16 10:49:18 +0300 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-04-16 21:07:25 -0700 |
commit | d062ff45be9b63afff87c25a7be2ffa626afdd5e (patch) | |
tree | a002dc6de8653f0bfaa86365caf590deaa864a66 /meta-networking/recipes-support/linux-atm | |
parent | bb1324cd5286739b47f0156186c510faf6e2018f (diff) | |
download | meta-openembedded-d062ff45be9b63afff87c25a7be2ffa626afdd5e.tar.gz |
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>
Diffstat (limited to 'meta-networking/recipes-support/linux-atm')
3 files changed, 39 insertions, 31 deletions
diff --git a/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch b/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch deleted file mode 100644 index ce061231c..000000000 --- a/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 27fa80dc8045e71c30dd2abea835206d5c8f6c71 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 17 Jun 2017 16:18:56 -0700 | ||
4 | Subject: [PATCH 2/3] sigd: Replace on_exit() API with atexit() | ||
5 | |||
6 | on_exit is not universally available | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/sigd/atmsigd.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/sigd/atmsigd.c b/src/sigd/atmsigd.c | ||
16 | index 52e41c7..b766606 100644 | ||
17 | --- a/src/sigd/atmsigd.c | ||
18 | +++ b/src/sigd/atmsigd.c | ||
19 | @@ -517,7 +517,7 @@ int main(int argc,char **argv) | ||
20 | exit(0); | ||
21 | } | ||
22 | } | ||
23 | - (void) on_exit(trace_on_exit,NULL); | ||
24 | + atexit(trace_on_exit); | ||
25 | poll_loop(); | ||
26 | close_all(); | ||
27 | for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal); | ||
28 | -- | ||
29 | 2.13.1 | ||
30 | |||
diff --git a/meta-networking/recipes-support/linux-atm/linux-atm/musl-no-on_exit.patch b/meta-networking/recipes-support/linux-atm/linux-atm/musl-no-on_exit.patch new file mode 100644 index 000000000..25211d7c1 --- /dev/null +++ b/meta-networking/recipes-support/linux-atm/linux-atm/musl-no-on_exit.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Description: musl lacks on_exit | ||
2 | Author: Adrian Bunk <bunk@stusta.de> | ||
3 | |||
4 | Only prints a trace on nonzero exit(), | ||
5 | so can safely be disabled in musl builds. | ||
6 | |||
7 | Signed-off-by: Adrian Bunk <bunk@stusta.de> | ||
8 | Upstream-Status: Inappropriate [musl specific] | ||
9 | |||
10 | --- linux-atm-2.5.1.orig/src/sigd/atmsigd.c | ||
11 | +++ linux-atm-2.5.1/src/sigd/atmsigd.c | ||
12 | @@ -283,6 +283,7 @@ static void setup_signals(void) | ||
13 | /* ------------------------------- main ... ------------------------------- */ | ||
14 | |||
15 | |||
16 | +#if 0 | ||
17 | static void trace_on_exit(int status,void *dummy) | ||
18 | { | ||
19 | char path[PATH_MAX+1]; | ||
20 | @@ -300,6 +301,7 @@ static void trace_on_exit(int status,voi | ||
21 | dump_trace(file,"Message trace (after error exit)"); | ||
22 | if (file != stderr) (void) fclose(file); | ||
23 | } | ||
24 | +#endif | ||
25 | |||
26 | |||
27 | static void manual_override(void) | ||
28 | @@ -517,7 +519,9 @@ int main(int argc,char **argv) | ||
29 | exit(0); | ||
30 | } | ||
31 | } | ||
32 | +#if 0 | ||
33 | (void) on_exit(trace_on_exit,NULL); | ||
34 | +#endif | ||
35 | poll_loop(); | ||
36 | close_all(); | ||
37 | for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal); | ||
diff --git a/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb index d34dc842f..9ed7ca613 100644 --- a/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb +++ b/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb | |||
@@ -10,11 +10,12 @@ SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${P | |||
10 | file://install-from-buildir.patch \ | 10 | file://install-from-buildir.patch \ |
11 | file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \ | 11 | file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \ |
12 | file://0001-ttcp-Add-printf-format-string.patch \ | 12 | file://0001-ttcp-Add-printf-format-string.patch \ |
13 | file://0002-sigd-Replace-on_exit-API-with-atexit.patch \ | ||
14 | file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \ | 13 | file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \ |
15 | file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \ | 14 | file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \ |
16 | " | 15 | " |
17 | 16 | ||
17 | SRC_URI_append_libc-musl = " file://musl-no-on_exit.patch" | ||
18 | |||
18 | SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8" | 19 | SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8" |
19 | SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a" | 20 | SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a" |
20 | 21 | ||