--- a/hotspot/src/os/bsd/vm/os_bsd.cpp Wed Mar 15 10:25:37 2017 -0400
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp Mon Mar 13 20:23:11 2017 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1754,7 +1754,7 @@
assert(ret, "cannot locate libjvm");
char *rp = NULL;
if (ret && dli_fname[0] != '\0') {
- rp = realpath(dli_fname, buf);
+ rp = os::Posix::realpath(dli_fname, buf, buflen);
}
if (rp == NULL) {
return;
@@ -1786,7 +1786,7 @@
p = strrchr(buf, '/');
assert(strstr(p, "/libjvm") == p, "invalid library name");
- rp = realpath(java_home_var, buf);
+ rp = os::Posix::realpath(java_home_var, buf, buflen);
if (rp == NULL) {
return;
}
@@ -1820,7 +1820,7 @@
snprintf(buf + len, buflen-len, "/libjvm%s", JNI_LIB_SUFFIX);
} else {
// Fall back to path of current library
- rp = realpath(dli_fname, buf);
+ rp = os::Posix::realpath(dli_fname, buf, buflen);
if (rp == NULL) {
return;
}