RFR : 8211146 : fix problematic elif-tests after recent gcc warning changes Werror=undef

Baesken, Matthias matthias.baesken at sap.com
Wed Sep 26 09:24:50 UTC 2018


Hello, please review this small build fix .
After the recent  changes  to  the gcc compile flags   with  8211029    ,  most of our  Linux builds stopped working .

Error :

=== Output from failing command(s) repeated here ===
* For target support_native_java.base_libnet_DatagramPacket.o:
In file included from /OpenJDK/8210319/jdk/src/java.base/share/native/libnet/net_util.h:31:0,
                from /OpenJDK/8210319/jdk/src/java.base/share/native/libnet/DatagramPacket.c:27:
/OpenJDK/8210319/jdk/src/java.base/unix/native/libnet/net_util_md.h:50:7: error: "__solaris__" is not defined [-Werror=undef]
#elif __solaris__
       ^

After looking into it,  it seems  that  the   jdk/src/java.base/unix/native/libnet/net_util_md.h    compile error is only triggered on older Linux OS  (e.g. SLES11).
Probably that's why it was not seen at Oracle  after  puhsing  after 8211029   .

Some greps  showed me a number of similar problematic  #elif-checks for OS, I adjusted them too .


Bug / webrev :

https://bugs.openjdk.java.net/browse/JDK-8211146


http://cr.openjdk.java.net/~mbaesken/webrevs/8211146.0/


Thanks, Matthias



More information about the build-dev mailing list