$NetBSD: patch-am,v 1.7 2009/08/21 08:27:29 abs Exp $ --- krfb/libvncserver/rfb.h.orig 2008-08-19 19:13:37.000000000 +0100 +++ krfb/libvncserver/rfb.h @@ -41,6 +41,19 @@ extern "C" typedef unsigned char CARD8; typedef unsigned short CARD16; +/* Copied from Xmd.h */ +#if defined (_LP64) || \ + defined(__alpha) || defined(__alpha__) || \ + defined(__ia64__) || defined(ia64) || \ + defined(__sparc64__) || \ + defined(__s390x__) || \ + (defined(__hppa__) && defined(__LP64__)) || \ + defined(__amd64__) || defined(amd64) || \ + defined(__powerpc64__) || \ + (defined(sgi) && (_MIPS_SZLONG == 64)) +#define LONG64 /* 32/64-bit architecture */ +#endif + #ifdef LONG64 typedef unsigned long CARD64; typedef unsigned int CARD32; @@ -69,7 +82,7 @@ typedef unsigned long KeySym; #ifdef __linux__ #include -#elif defined(__APPLE__) || defined(__FreeBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) #include #include #ifndef _BYTE_ORDER @@ -83,7 +96,7 @@ typedef unsigned long KeySym; #if defined(__sparc) /* SPARC here (big endian) */ #define _BYTE_ORDER 4321 -#elif defined(__i386) +#elif defined(__i386) || defined(__amd64) #define _BYTE_ORDER 1234 #else #error Solaris 2.5.1 had ppc support did it not? :-)