$NetBSD: patch-af,v 1.2 2012/03/07 15:52:40 hans Exp $ --- x11.c.orig 2006-01-12 20:53:39.000000000 +0000 +++ x11.c @@ -31,8 +31,18 @@ #include #if defined(__FreeBSD__) #include -#elif defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #include +#elif defined(__sun) +#include +#define LITTLE_ENDIAN 1234 +#define BIG_ENDIAN 4321 +#define PDP_ENDIAN 3412 +#ifdef _BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif #else /* Linux */ #include #endif @@ -93,6 +103,8 @@ #ifdef HAVE_SYS_SHM_H #ifdef HAVE_X11_EXTENSIONS_XSHM_H #define HAVE_SHM 1 +#include +#include #endif /* HAVE_X11_EXTENSIONS_XSHM_H */ #endif /* HAVE_SYS_SHM_H */ #endif /* HAVE_SYS_IPC_H */