$OpenBSD: patch-src_hotspot_os_posix_os_posix_cpp,v 1.1 2020/04/22 15:05:18 kurt Exp $

OpenBSD doesn't have utmpx.h

Index: src/hotspot/os/posix/os_posix.cpp
--- src/hotspot/os/posix/os_posix.cpp.orig
+++ src/hotspot/os/posix/os_posix.cpp
@@ -46,7 +46,9 @@
 #include <sys/utsname.h>
 #include <time.h>
 #include <unistd.h>
+#ifndef __OpenBSD__
 #include <utmpx.h>
+#endif
 
 // Todo: provide a os::get_max_process_id() or similar. Number of processes
 // may have been configured, can be read more accurately from proc fs etc.
@@ -398,6 +400,7 @@ void os::Posix::print_load_average(outputStream* st) {
   st->cr();
 }
 
+#ifndef __OpenBSD__
 // boot/uptime information;
 // unfortunately it does not work on macOS and Linux because the utx chain has no entry
 // for reboot at least on my test machines
@@ -417,6 +420,7 @@ void os::Posix::print_uptime_info(outputStream* st) {
     os::print_dhm(st, "OS uptime:", (long) (currsec-bootsec));
   }
 }
+#endif
 
 
 void os::Posix::print_rlimit_info(outputStream* st) {
