--- old/src/java.base/unix/native/libjava/ProcessImpl_md.c Mon Sep 21 16:48:37 2015 +++ new/src/java.base/unix/native/libjava/ProcessImpl_md.c Mon Sep 21 16:48:37 2015 @@ -26,6 +26,7 @@ #undef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE 1 +#include "jdk_strerror.h" #include "jni.h" #include "jvm.h" #include "jvm_md.h" @@ -248,12 +249,13 @@ const char *detail = defaultDetail; char *errmsg; size_t fmtsize; + char buf[1024]; jstring s; if (errnum != 0) { - const char *s = strerror(errnum); - if (strcmp(s, "Unknown error") != 0) - detail = s; + jdk_strerror(errnum, buf, (size_t) 1024); + if (strncmp(buf, "Unknown error", 13) != 0) + detail = buf; } /* ASCII Decimal representation uses 2.4 times as many bits as binary. */ fmtsize = sizeof(IOE_FORMAT) + strlen(detail) + 3 * sizeof(errnum);