On Fri, 27 Feb 2026 09:57:39 GMT, Matthias Baesken <[email protected]> wrote:

>> We run into compile errors on AIX :
>> 
>> 
>> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5:
>>  error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef]
>>   470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */
>>       | ^
>> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5:
>>  error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef]
>>   474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */
>>       | ^
>> 2 errors generated.
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Adjust check

Hello Thomas,

> I am surprised that this is not necessary on all Unixes, tbh. What about 
> Linux?

When that check was added in https://bugs.openjdk.org/browse/JDK-8286582, the 
issue was trying to address macosx. So it just checked for that specific OS. 

In theory, if we bundle zlib for any *nix OS, then these macros should be set 
too. We don't by default bundle zlib for Linux, and I haven't tried with 
`--with-zlib=bundled` on Linux. If it's guaranteed that stdarg.h and unistd.h 
are present on Linux, then I think we can add these macros there too. 
Otherwise, a conditional that tests the exit code of compiling a test C program 
with those includes would be required for Linux. It can be done as a separate 
task.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3972062652

Reply via email to