pkgsrc/net/kdenetwork3/patches/patch-am
abs 268e423ea5 fix build on NetBSD.amd64 using x11 from base (tested on modular x11)
- krfb/libvncserver/rfb.h had cope apparently copied from X11's Xmd.h,
but it missed setting LONG64, resulting in a mismatched typedef for CARD32
bump pkgrevision. Found on Alex's new kde3 playbox.
2009-08-21 08:27:29 +00:00

42 lines
1.3 KiB
Text

$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 <endian.h>
-#elif defined(__APPLE__) || defined(__FreeBSD__)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/types.h>
#include <machine/endian.h>
#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? :-)