$NetBSD: patch-ab,v 1.5 2019/07/15 22:58:50 nia Exp $

Add endian.h header for macosx

--- applyplugin.c.orig	2007-11-06 10:52:56.000000000 +0000
+++ applyplugin.c
@@ -6,7 +6,19 @@
 /*****************************************************************************/
 
 #include <dlfcn.h>
-#include <endian.h>
+#ifdef __linux__
+# include <endian.h>
+#elif defined(__sun)
+# include <sys/byteorder.h>
+# ifdef _LITTLE_ENDIAN
+#  define LITTLE_ENDIAN 1234
+#  define BYTE_ORDER LITTLE_ENDIAN
+# endif
+#elif defined(__APPLE__)
+# include <machine/endian.h>
+#else
+# include <sys/endian.h>
+#endif
 #include <errno.h>
 #include <math.h>
 #include <stdlib.h>
