RFR 8252248: __SIGRTMAX is not declared in musl libc
alexander.scherbatiy at bell-sw.com
Tue Aug 25 17:00:37 UTC 2020
Could your review the fix for the issue:
Building JDK on Alpine Linux with musl libc gives the error:
'__SIGRTMAX' undeclared here (not in a function); did you mean 'SIGRTMAX'?
63 | static int sigWakeup = (__SIGRTMAX - 2);
musl libc does not contain __SIGRTMAX definition. It defines only
SIGRTMAX as a function call .
__SIGRTMAX is used in JDK in two files NativeThread.c and linux_close.c .
The first idea of the fix was simply to substitute __SIGRTMAX to
SIGRTMAX in NativeThread.c and use the same definition
#define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
"static int sigWakeup = (SIGRTMAX - 2)" does not work because the
SIGRTMAX is defined as a function and leads to "initializer element is
not constant" error.
The fix has been discussed on the portola-dev alias  where it was
pointed out that the fix can be reviewed in the mainline and it was
suggested to rename the INTERRUPT_SIGNAL and move its definition to
More information about the core-libs-dev