$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bytes_bsd_x86_inline_hpp,v 1.1 2008/03/19 18:05:43 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp.orig	Wed Nov  7 15:05:15 2007
+++ hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp	Wed Nov  7 15:20:05 2007
@@ -22,7 +22,15 @@
  *
  */
 
+#ifndef _ALLBSD_SOURCE
 #include <byteswap.h>
+#endif
+
+#if defined(AMD64) && defined (__OpenBSD__)
+# define bswap_16(x)	swap16(x)
+# define bswap_32(x)	swap32(x)
+# define bswap_64(x)	swap64(x)
+#endif
 
 // Efficient swapping of data bytes from Java byte
 // ordering to native byte ordering and vice versa.
