On Fri, 27 Feb 2026 10:25:45 GMT, Jaikiran Pai <[email protected]> wrote:

> 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.

I came across this change in it being backported to 11u and had the same 
thought.  While this patch is ok to fix the immediate problem, a more general 
solution would be to pass through results from OpenJDK's `configure`.  The 
flags are not set because zlib's configure never runs, so we are effectively 
recreating its output in the OpenJDK Makefile.

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

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

Reply via email to