From 39ec3978ebecd67f9aacdac5a43af4d465be19dd584757441217cdc3a6e3e3c5 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 6 May 2024 12:57:25 +0000 Subject: [PATCH] Accepting request 1172167 from home:gkenion:branches:Java:packages GCC 14 compatibility fix. OBS-URL: https://build.opensuse.org/request/show/1172167 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-daemon?expand=0&rev=51 --- apache-commons-daemon-JAVA_OS.patch | 8 +++++--- apache-commons-daemon-gcc14-compat.patch | 13 +++++++++++++ apache-commons-daemon.changes | 7 +++++++ apache-commons-daemon.spec | 2 ++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 apache-commons-daemon-gcc14-compat.patch diff --git a/apache-commons-daemon-JAVA_OS.patch b/apache-commons-daemon-JAVA_OS.patch index bcdcdc4..90dd8d3 100644 --- a/apache-commons-daemon-JAVA_OS.patch +++ b/apache-commons-daemon-JAVA_OS.patch @@ -1,6 +1,8 @@ ---- commons-daemon-1.2.2-src.orig/src/native/unix/configure.in -+++ commons-daemon-1.2.2-src/src/native/unix/configure.in -@@ -98,7 +98,7 @@ then +Index: commons-daemon-1.3.4-src/src/native/unix/configure.in +=================================================================== +--- commons-daemon-1.3.4-src.orig/src/native/unix/configure.in ++++ commons-daemon-1.3.4-src/src/native/unix/configure.in +@@ -97,7 +97,7 @@ then AC_MSG_RESULT([jni_md.h found in $JAVA_HOME/$JAVA_INC]) INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/$JAVA_INC" else diff --git a/apache-commons-daemon-gcc14-compat.patch b/apache-commons-daemon-gcc14-compat.patch new file mode 100644 index 0000000..fa43124 --- /dev/null +++ b/apache-commons-daemon-gcc14-compat.patch @@ -0,0 +1,13 @@ +Index: commons-daemon-1.3.4-src/src/native/unix/native/jsvc-unix.c +=================================================================== +--- commons-daemon-1.3.4-src.orig/src/native/unix/native/jsvc-unix.c ++++ commons-daemon-1.3.4-src/src/native/unix/native/jsvc-unix.c +@@ -1308,7 +1308,7 @@ static int run_controller(arg_data *args + * These will be replaced in the child process. + */ + memset(&act, '\0', sizeof(act)); +- act.sa_handler = controller; ++ act.sa_handler = (void *) controller; + sigemptyset(&act.sa_mask); + act.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_SIGINFO; + diff --git a/apache-commons-daemon.changes b/apache-commons-daemon.changes index 3f00692..323de24 100644 --- a/apache-commons-daemon.changes +++ b/apache-commons-daemon.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 6 11:08:35 UTC 2024 - Gus Kenion + +- Add apache-commons-daemon-gcc14-compat.patch for GCC 14 + compatibility. +- Correct offset in apache-commons-daemon-JAVA_OS.patch. + ------------------------------------------------------------------- Tue Feb 20 11:03:50 UTC 2024 - Dominique Leuenberger diff --git a/apache-commons-daemon.spec b/apache-commons-daemon.spec index 2c6574d..f7000b7 100644 --- a/apache-commons-daemon.spec +++ b/apache-commons-daemon.spec @@ -31,6 +31,7 @@ Source1: https://archive.apache.org/dist/commons/daemon/source/%{short_na Source2: apache-commons-daemon.keyring Source10: apache-commons-daemon-build.xml Patch0: apache-commons-daemon-JAVA_OS.patch +Patch1: apache-commons-daemon-gcc14-compat.patch BuildRequires: ant BuildRequires: autoconf BuildRequires: fdupes @@ -77,6 +78,7 @@ The Javadoc Documentation for Commons Daemon. %setup -q -n %{short_name}-%{version}-src cp %{SOURCE10} build.xml %patch -P 0 -p1 +%patch -P 1 -p1 # remove java binaries from sources rm -rf src/samples/build/