Files
buildroot/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch
Fiona Klute e9ce3c7753 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 <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 54240460dc)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-08-07 11:06:39 +02:00

41 lines
1.1 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
From aa6779c2846f13bf58575486b374ef06b2844fe8 Mon Sep 17 00:00:00 2001
From: Yegor Yefremov <yegorslists@googlemail.com>
Date: Tue, 21 May 2024 11:13:17 +0200
Subject: [PATCH] lib/long-options.c: include stdlib.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes the following error (compiled with GCC 14.x):
long-options.c:70:11: error: implicit declaration of function ‘exit’
[-Wimplicit-function-declaration]
70 | exit (0);
| ^~~~
Upstream: https://github.com/UweOhse/lrzsz/pull/4
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Fiona: remove conditional on __GNU_LIBRARY__ to fix build with musl]
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
lib/long-options.c | 9 +++++++++
1 file changed, 9 insertions(+)
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,9 @@
#endif
#include <stdio.h>
+
+#include <stdlib.h>
+
#include <getopt.h>
#include "long-options.h"
--
2.46.0