From 54240460dcdbb1df76a092ad0f9d30b5b9875973 Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Sat, 21 Jun 2025 00:18:50 +0200 Subject: [PATCH] package/lrzsz: fix build with musl lib/long-options.c failed to compile with musl for the same reason 0002-lib-long-options.c-include-stdlib.h.patch was added to fix, exit() being undefined. The fix is the same as well: include stdlib.h. Fixes: b6784a1f1f ("package/lrzsz: fix build with GCC >= 14.x") Signed-off-by: Fiona Klute Signed-off-by: Julien Olivain --- .../0002-lib-long-options.c-include-stdlib.h.patch | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch b/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch index 6229114e0a..f0532bd036 100644 --- a/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch +++ b/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch @@ -15,6 +15,8 @@ long-options.c:70:11: error: implicit declaration of function ‘exit’ Upstream: https://github.com/UweOhse/lrzsz/pull/4 Signed-off-by: Thomas Petazzoni +[Fiona: remove conditional on __GNU_LIBRARY__ to fix build with musl] +Signed-off-by: Fiona Klute --- lib/long-options.c | 9 +++++++++ 1 file changed, 9 insertions(+) @@ -23,18 +25,12 @@ diff --git a/lib/long-options.c b/lib/long-options.c index 76b9796..19c84e0 100644 --- a/lib/long-options.c +++ b/lib/long-options.c -@@ -22,6 +22,15 @@ +@@ -22,6 +22,9 @@ #endif #include + -+/* This needs to come after some library #include -+ to get __GNU_LIBRARY__ defined. */ -+#ifdef __GNU_LIBRARY__ -+/* Don't include stdlib.h for non-GNU C libraries because some of them -+ contain conflicting prototypes for getopt. */ +#include -+#endif /* GNU C library. */ + #include #include "long-options.h"