$OpenBSD$

Index: encode/jpegenc_utils.h
--- encode/jpegenc_utils.h.orig
+++ encode/jpegenc_utils.h
@@ -49,6 +49,9 @@ struct __bitstream {
 
 typedef struct __bitstream bitstream;
 
+#ifdef __OpenBSD__
+#include <sys/endian.h>
+#else
 static unsigned int 
 swap32(unsigned int val)
 {
@@ -59,6 +62,7 @@ swap32(unsigned int val)
             (pval[2] << 8)      |
             (pval[3] << 0));
 }
+#endif /* __OpenBSD__ */
 
 static void
 bitstream_start(bitstream *bs)
