hotspot/src/os/posix/vm/os_posix.cpp
changeset 31963 641ed52732ec
parent 31610 b05ea6f92971
child 31991 a7dd5bba0fd8
--- a/hotspot/src/os/posix/vm/os_posix.cpp	Tue Jul 21 07:28:37 2015 -0700
+++ b/hotspot/src/os/posix/vm/os_posix.cpp	Wed Jul 22 00:03:45 2015 -0400
@@ -236,6 +236,15 @@
   st->cr();
 }
 
+#ifndef PRODUCT
+bool os::get_host_name(char* buf, size_t buflen) {
+  struct utsname name;
+  uname(&name);
+  jio_snprintf(buf, buflen, "%s", name.nodename);
+  return true;
+}
+#endif // PRODUCT
+
 bool os::has_allocatable_memory_limit(julong* limit) {
   struct rlimit rlim;
   int getrlimit_res = getrlimit(RLIMIT_AS, &rlim);