$OpenBSD: patch-src_libical_icaltz-util_c,v 1.4 2014/10/20 15:51:54 ajacoutot Exp $
--- src/libical/icaltz-util.c.orig	Thu Oct  9 17:07:05 2014
+++ src/libical/icaltz-util.c	Mon Oct 20 17:28:34 2014
@@ -33,6 +33,14 @@
 #if defined(sun) && defined(__SVR4)
 #include <sys/types.h>
 #include <sys/byteorder.h>
+#elif defined(__OpenBSD__)
+#include <sys/types.h>
+#define __BYTE_ORDER	_BYTE_ORDER
+#define __LITTLE_ENDIAN	_LITTLE_ENDIAN
+#define __BIG_ENDIAN	_BIG_ENDIAN
+#define bswap_16	swap16
+#define bswap_32	swap32
+#define bswap_64	swap64
 #else
 # ifdef HAVE_BYTESWAP_H
 #  include <byteswap.h>
@@ -143,6 +151,8 @@ decode (const void *ptr)
     if (sizeof (int) == 4)
 #ifdef _BIG_ENDIAN
         return *(const int *) ptr;
+#elif __OpenBSD__
+	return swap32 (*(const uint32_t *) ptr);
 #else
         return BSWAP_32 (*(const int *) ptr);
 #endif
