| ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ jsvc-unix.c:1093:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] 1093 | freopen("/dev/null", "a", stderr); | ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ clang -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -Wall -Wstrict-prototypes -DHAVE_LIBCAP -I/opt/openjdk-bin-21.0.1_p12/include -I/opt/openjdk-bin-21.0.1_p12/include/linux -c dso-dyld.c -o dso-dyld.o jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to '__sighandler_t' (aka 'void (*)(int)') from 'void (int, siginfo_t *, void *)' [-Wincompatible-function-pointer-types] ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_systemd_merged_usr-20231128-203237 ------------------------------------------------------------------- CC=clang CXX=clang++ gcc-config -l: [1] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 17.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/17/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg /usr/lib/llvm/17 17.0.6 Python 3.11.6 Available Ruby profiles: [1] ruby31 (with Rubygems) * Available Rust versions: [1] rust-bin-1.73.0 * GENTOO_VM=openjdk-bin-21 CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-21.0.1_p12" JAVACFLAGS="-source 1.8 -target 1.8" COMPILER="" The following VMs are available for generation-2: *) Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21] Available Java Virtual Machines: [1] openjdk-bin-21 system-vm php cli (if any): go version go1.21.4 linux/amd64 HEAD of ::gentoo commit aa44b1d11312a24c718788d7f848707685e971f0 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Thu Nov 30 10:16:57 2023 +0000 2023-11-30 10:16:57 UTC emerge -qpvO dev-java/commons-daemon [ebuild N ] dev-java/commons-daemon-1.3.4 USE="-doc -source -test -verify-sig"
Created attachment 875992 [details] emerge-info.txt
Created attachment 875993 [details] dev-java:commons-daemon-1.3.4:20231130-104642.log
Created attachment 875994 [details] emerge-history.txt
Created attachment 875995 [details] environment
Created attachment 875996 [details] etc.clang.tar.xz
Created attachment 875997 [details] etc.portage.tar.xz
Created attachment 875998 [details] logs.tar.xz
Created attachment 875999 [details] qlist-info.txt
Unless I'm too sleepy, this code is plain wrong. Line 1311 assigns the "controller" callback to act.sa_handler, which expects a pointer to a function taking a single int (like e.g. "handler", #89). When the signal handler function needs access to additional signal information and SA_SIGINFO is specified in act.sa_flags (#1313) the function must be assigned to act.sa_sigaction instead: diff --git a/src/native/unix/native/jsvc-unix.c b/src/native/unix/native/jsvc-unix.c index e331a0f..187e404 100644 --- a/src/native/unix/native/jsvc-unix.c +++ b/src/native/unix/native/jsvc-unix.c @@ -1308,7 +1308,7 @@ static int run_controller(arg_data *args, home_data *data, uid_t uid, gid_t gid) * These will be replaced in the child process. */ memset(&act, '\0', sizeof(act)); - act.sa_handler = controller; + act.sa_sigaction = controller; sigemptyset(&act.sa_mask); act.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_SIGINFO; Doing so lets the file compile with clang. For more see man sigaction(2) "The siginfo_t argument to a SA_SIGINFO handler". Anybody going in there should probably also fix the "unused return value" warnings for extra credit. :)
this is also with gcc-14, removing clang from summary
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa5a5ceb226fb8c61daf2f4e3c7b0d848e8ea194 commit fa5a5ceb226fb8c61daf2f4e3c7b0d848e8ea194 Author: Volkmar W. Pogatzki <gentoo@pogatzki.net> AuthorDate: 2024-10-13 21:06:13 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2024-10-14 09:22:07 +0000 dev-java/commons-daemon: drop 1.3.4 Closes: https://bugs.gentoo.org/918912 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/38836/commits/3748c796569d0e293c98d5defbd39222aab49ef7 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> dev-java/commons-daemon/Manifest | 2 - .../commons-daemon/commons-daemon-1.3.4.ebuild | 55 ---------------------- 2 files changed, 57 deletions(-)