Index: Source/LibOpenJPEG/opj_malloc.h
--- Source/LibOpenJPEG/opj_malloc.h.orig
+++ Source/LibOpenJPEG/opj_malloc.h
@@ -96,7 +96,7 @@ Allocate memory aligned to a 16 byte boundry
   #elif defined(__FreeBSD__)
     #define HAVE_POSIX_MEMALIGN
 	/* Linux x86_64 and OSX always align allocations to 16 bytes */
-	#elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX)
+	#elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX)  && !defined(__OpenBSD__)
 		#define HAVE_MEMALIGN
 		#include <malloc.h>			
 	#endif
