On Wed, 9 Sep 2026 12:39:26 GMT, Jaikiran Pai <[email protected]> wrote:

>> Matthias Baesken has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Fix Lib.gmk COPYRIGHT header
>
> src/java.base/unix/native/libnio/ch/Net.c line 694:
> 
>> 692:     struct ipv6_mreq mreq6;
>> 693: #ifndef __APPLE__
>> 694:     struct group_source_req req;
> 
> Hello Matthias, would it be more appropriate to move this declaration 
> directly into the `#else` block where the call to `initGroupSourceReq()` 
> function happens for non-Apple platforms? I don't know if there are specific 
> guidelines in the JDK C code which require us to declare the function 
> variables right at the beginning of the function.

We build with std=c11 so it should be fine to move the declaration.
And there are already code locations in the C codebase where this is done
https://github.com/openjdk/jdk/blob/master/src/java.base/macosx/native/libnio/ch/FileDispatcherImpl.c#L54

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32782#discussion_r3968814409

Reply via email to