summaryrefslogtreecommitdiff
path: root/devel/cqual/patches/patch-bh
diff options
context:
space:
mode:
Diffstat (limited to 'devel/cqual/patches/patch-bh')
-rw-r--r--devel/cqual/patches/patch-bh30
1 files changed, 30 insertions, 0 deletions
diff --git a/devel/cqual/patches/patch-bh b/devel/cqual/patches/patch-bh
new file mode 100644
index 00000000000..273a3168de4
--- /dev/null
+++ b/devel/cqual/patches/patch-bh
@@ -0,0 +1,30 @@
+$NetBSD: patch-bh,v 1.1 2006/01/18 23:24:12 rillig Exp $
+
+SunPro thinks that the result of the "," operator is not an lvalue.
+Fixed this by using *&foo instead of foo.
+
+--- src/libcompat/pages.c.orig 2003-09-11 21:03:24.000000000 +0200
++++ src/libcompat/pages.c 2006-01-16 14:11:33.668681000 +0100
+@@ -299,7 +299,7 @@ static void preaccess_regionmap (pageid
+ }
+ }
+
+-#define page_region(pagenb) (preaccess_regionmap(pagenb), __rcregionmap[(pagenb)/RPAGETABLESIZE2][(pagenb)%RPAGETABLESIZE2])
++#define page_region(pagenb) (*(preaccess_regionmap(pagenb), &(__rcregionmap[(pagenb)/RPAGETABLESIZE2][(pagenb)%RPAGETABLESIZE2])))
+
+ #else
+
+@@ -322,10 +322,10 @@ static void preaccess_regionmap (pageid
+ }
+ }
+
+-#define page_region(pagenb) (preaccess_regionmap(pagenb), \
+- __rcregionmap[(pagenb)/(RPAGETABLESIZE2*RPAGETABLESIZE3)] \
++#define page_region(pagenb) (*(preaccess_regionmap(pagenb), \
++ &(__rcregionmap[(pagenb)/(RPAGETABLESIZE2*RPAGETABLESIZE3)] \
+ [((pagenb)%(RPAGETABLESIZE2*RPAGETABLESIZE3))/RPAGETABLESIZE3] \
+- [(pagenb)%RPAGETABLESIZE3])
++ [(pagenb)%RPAGETABLESIZE3])))
+
+ #endif /* SIZEOF_VOIDP <= 4 */
+