From 51f474190171599cb17213a43741fdeccb70d268597263fe95997ebc5912e764 Mon Sep 17 00:00:00 2001 From: David Anes Date: Mon, 6 May 2024 07:04:35 +0000 Subject: [PATCH] Accepting request 1172005 from home:dziobian - Fix ftbfs with GCC14 (bsc#1220571) * correct libxslt-random-seed.patch to include time.h unconditionally * add gcc14-runtest-no-const.patch OBS-URL: https://build.opensuse.org/request/show/1172005 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxslt?expand=0&rev=101 --- gcc14-runtest-no-const.patch | 11 +++++++++++ libxslt-random-seed.patch | 4 +--- libxslt.changes | 7 +++++++ libxslt.spec | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 gcc14-runtest-no-const.patch diff --git a/gcc14-runtest-no-const.patch b/gcc14-runtest-no-const.patch new file mode 100644 index 0000000..1452f93 --- /dev/null +++ b/gcc14-runtest-no-const.patch @@ -0,0 +1,11 @@ +--- libxslt-1.1.39/tests/runtest.c.old 2023-11-16 12:36:28.000000000 +0000 ++++ libxslt-1.1.39/tests/runtest.c 2024-05-05 16:25:22.656618600 +0000 +@@ -269,7 +269,7 @@ xmlParserPrintFileContextInternal(xmlPar + } + + static void +-testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, const xmlError *err) { ++testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, xmlError *err) { + char *file = NULL; + int line = 0; + int code = -1; diff --git a/libxslt-random-seed.patch b/libxslt-random-seed.patch index 2c15efb..346b081 100644 --- a/libxslt-random-seed.patch +++ b/libxslt-random-seed.patch @@ -8,7 +8,7 @@ Index: libxslt-v1.1.36/libexslt/math.c =================================================================== --- libxslt-v1.1.36.orig/libexslt/math.c +++ libxslt-v1.1.36/libexslt/math.c -@@ -12,6 +12,14 @@ +@@ -12,6 +12,12 @@ #include #include @@ -16,9 +16,7 @@ Index: libxslt-v1.1.36/libexslt/math.c +#include +#endif +#include -+#ifdef HAVE_TIME_H +#include -+#endif + #include "exslt.h" diff --git a/libxslt.changes b/libxslt.changes index fc8bd93..d23b0e3 100644 --- a/libxslt.changes +++ b/libxslt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun May 5 16:26:10 UTC 2024 - Bruno Pitrus + +- Fix ftbfs with GCC14 (bsc#1220571) + * correct libxslt-random-seed.patch to include time.h unconditionally + * add gcc14-runtest-no-const.patch + ------------------------------------------------------------------- Fri Nov 24 20:53:10 UTC 2023 - Bjørn Lie diff --git a/libxslt.spec b/libxslt.spec index 30c6be9..f4777d0 100644 --- a/libxslt.spec +++ b/libxslt.spec @@ -40,6 +40,8 @@ Patch0: libxslt-1.1.24-no-net-autobuild.patch # Initialize the random seed to ensure libxslt's math.random() function # produces unpredictable outputs. Patch1: libxslt-random-seed.patch +# PATCH-FIX_UPSTREAM -- gcc14-runtest-no-const.patch +Patch2: gcc14-runtest-no-const.patch # ### SUSE patches starts on 1000 # PATCH-FIX-SUSE