In
http://hg.openjdk.java.net/jdk/jdk/file/64ca9fbcf85f/src/java.base/unix/native/libnet/Inet6AddressImpl.c#l172
if ((*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID)) {
That is `InetAddress.preferIPv6Address` is used as a boolean, but
http://hg.openjdk.java.net/jdk/jdk/file/64ca9fbcf85f/src/java.base/share/classes/java/net/InetAddress.java#l216
/* Specify address family preference */
static transient final int preferIPv6Address;
That is, it is an `int`. (In JDK-8 it was a `boolean`.)
I don't know how `GetStaticBoolean` deals with a mismatch in types. The result will be interpreted by the `C` 0-or-not-0 test. I don't know if that is what is needed here.
(Note that this is inside a `#if defined(MACOSX)` block.)