From a63ed29a7761d3eb7964f2e9dc2a45170cb34df1 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 22 Apr 2023 22:23:26 +0200 Subject: [PATCH] Add elfutils-0.189-c99-compat.patch --- elfutils-0.189-c99-compat.patch | 31 +++++++++++++++++++++++++++++++ elfutils.spec | 5 +++++ 2 files changed, 36 insertions(+) create mode 100644 elfutils-0.189-c99-compat.patch diff --git a/elfutils-0.189-c99-compat.patch b/elfutils-0.189-c99-compat.patch new file mode 100644 index 0000000..4932c2c --- /dev/null +++ b/elfutils-0.189-c99-compat.patch @@ -0,0 +1,31 @@ +From 6e7ac623674242628c9e54892a532d55d3288bb8 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Sat, 22 Apr 2023 21:37:09 +0200 +Subject: [PATCH] testsuite: Avoid C99 compatibility issues in + run-native-test.sh + +Include for the pause function, and add the return type +of main. Avoids an implicit function declaration and implicit int. + +Signed-off-by: Florian Weimer +--- + tests/run-native-test.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh +index d19007f2..042a51c6 100755 +--- a/tests/run-native-test.sh ++++ b/tests/run-native-test.sh +@@ -27,7 +27,8 @@ + # in all builds. + + tempfiles native.c native +-echo 'main () { while (1) pause (); }' > native.c ++printf '#include \nint main (void) { while (1) pause (); }\n' \ ++ > native.c + + native=0 + kill_native() +-- +2.31.1 + diff --git a/elfutils.spec b/elfutils.spec index 8d2b05b..8de0442 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -74,6 +74,8 @@ BuildRequires: gettext-devel # For s390x... FDO package notes are bogus. Patch1: elfutils-0.186-fdo-swap.patch +# testsuite: Avoid C99 compatibility issues in run-native-test.sh +Patch2: elfutils-0.189-c99-compat.patch %description Elfutils is a collection of utilities, including stack (to show @@ -442,6 +444,9 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Sat Apr 22 2023 Mark Wielaard +- Add elfutils-0.189-c99-compat.patch + * Fri Mar 3 2023 Mark Wielaard - 0.189-1 - Upgrade to upsteam elfutils 0.189.