--- a/src/d_osc.c
+++ b/src/d_osc.c
@@ -15,11 +15,13 @@
 #include <sys/endian.h>
 #endif
 
-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) \
+    || defined(__OpenBSD__)
 #include <machine/endian.h>
 #endif
 
-#if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || defined(__ANDROID__)
+#if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) \
+    || defined(__ANDROID__)
 #include <endian.h>
 #endif
 
@@ -33,7 +35,7 @@
 #define BYTE_ORDER LITTLE_ENDIAN
 #endif
 
-#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)                         
+#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) 
 #error No byte order defined                                                    
 #endif
 
@@ -41,8 +43,8 @@
 # define HIOFFSET 1                                                              
 # define LOWOFFSET 0                                                             
 #else                                                                           
-# define HIOFFSET 0    /* word offset to find MSB */                             
-# define LOWOFFSET 1    /* word offset to find LSB */                            
+# define HIOFFSET 0    /* word offset to find MSB */
+# define LOWOFFSET 1    /* word offset to find LSB */
 #endif
 
 union tabfudge