diff -Naur openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp --- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2017-01-30 11:02:07.890400844 -0800 +++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2017-01-30 11:03:01.814883550 -0800 @@ -46,6 +46,8 @@ #include "zip.h" +#define uchar unsigned char + #ifdef NO_ZLIB inline bool jar::deflate_bytes(bytes& head, bytes& tail) { diff -Naur openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h --- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h 2017-01-30 11:02:07.890400844 -0800 +++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h 2017-01-30 11:03:59.025407650 -0800 @@ -23,9 +23,7 @@ * questions. */ -#define ushort unsigned short -#define uint unsigned int -#define uchar unsigned char +#include struct unpacker; diff -Naur openjdk.orig/jdk/src/share/native/sun/awt/medialib/mlib_types.h openjdk/jdk/src/share/native/sun/awt/medialib/mlib_types.h --- openjdk.orig/jdk/src/share/native/sun/awt/medialib/mlib_types.h 2017-01-30 11:02:07.946401345 -0800 +++ openjdk/jdk/src/share/native/sun/awt/medialib/mlib_types.h 2017-01-30 11:04:50.032877774 -0800 @@ -27,6 +27,7 @@ #ifndef MLIB_TYPES_H #define MLIB_TYPES_H +#include /* for NULL */ #include #if defined(_MSC_VER) #include /* for FLT_MAX and DBL_MAX */ diff -Naur openjdk.orig/jdk/src/solaris/native/common/jdk_util_md.h openjdk/jdk/src/solaris/native/common/jdk_util_md.h --- openjdk.orig/jdk/src/solaris/native/common/jdk_util_md.h 2017-01-30 11:02:08.134403028 -0800 +++ openjdk/jdk/src/solaris/native/common/jdk_util_md.h 2017-01-30 11:05:23.910190013 -0800 @@ -37,7 +37,7 @@ #define ISNAND(d) isnan(d) #elif defined(__linux__) || defined(_ALLBSD_SOURCE) #include -#define ISNANF(f) isnanf(f) +#define ISNANF(f) isnan(f) #define ISNAND(d) isnan(d) #elif defined(_AIX) #include diff -Naur openjdk.orig/jdk/src/solaris/native/java/net/Inet4AddressImpl.c openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c --- openjdk.orig/jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2017-01-30 11:02:08.137403055 -0800 +++ openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2017-01-30 11:05:52.541453901 -0800 @@ -37,7 +37,7 @@ #include "java_net_Inet4AddressImpl.h" -#if defined(__GLIBC__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 601104)) +#if defined(__linux__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 601104)) #define HAS_GLIBC_GETHOSTBY_R 1 #endif diff -Naur openjdk.orig/jdk/src/solaris/native/java/net/linux_close.c openjdk/jdk/src/solaris/native/java/net/linux_close.c --- openjdk.orig/jdk/src/solaris/native/java/net/linux_close.c 2017-01-30 11:02:08.139403072 -0800 +++ openjdk/jdk/src/solaris/native/java/net/linux_close.c 2017-01-30 11:07:52.952560164 -0800 @@ -58,7 +58,7 @@ /* * Signal to unblock thread */ -static int sigWakeup = (__SIGRTMAX - 2); +static int sigWakeup; /* * fdTable holds one entry per file descriptor, up to a certain @@ -147,6 +147,9 @@ /* * Setup the signal handler */ +#ifndef __AIX + sigWakeup = SIGRTMAX - 2; +#endif sa.sa_handler = sig_wakeup; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); diff -Naur openjdk.orig/jdk/src/solaris/native/sun/nio/ch/NativeThread.c openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c --- openjdk.orig/jdk/src/solaris/native/sun/nio/ch/NativeThread.c 2017-01-30 11:02:08.172403368 -0800 +++ openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c 2017-01-30 11:08:20.559810213 -0800 @@ -36,7 +36,7 @@ #include #include /* Also defined in net/linux_close.c */ - #define INTERRUPT_SIGNAL (__SIGRTMAX - 2) + #define INTERRUPT_SIGNAL (SIGRTMAX - 2) #elif __solaris__ #include #include