aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2004-08-31 23:28:12 +0800
committermarius <marius@FreeBSD.org>2004-08-31 23:28:12 +0800
commit095566fcd9450c396d153ca02696393dfacc5264 (patch)
tree536b56fc91d27b0af05b7aba16c302d87d5f0a15 /sysutils
parent92a31250fd8577609b19395e4d171554f625730d (diff)
downloadfreebsd-ports-gnome-095566fcd9450c396d153ca02696393dfacc5264.tar.gz
freebsd-ports-gnome-095566fcd9450c396d153ca02696393dfacc5264.tar.zst
freebsd-ports-gnome-095566fcd9450c396d153ca02696393dfacc5264.zip
Fix a bug exposed by src/sys/vm/vm_mmap.c revision 1.192, devices can't
be mmap(2)'ed MAP_PRIVATE. Approved by: eik
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/afbinit/Makefile1
-rw-r--r--sysutils/afbinit/files/patch-afbinit.c18
2 files changed, 19 insertions, 0 deletions
diff --git a/sysutils/afbinit/Makefile b/sysutils/afbinit/Makefile
index fc96b6f7f1f6..287464f7aeb7 100644
--- a/sysutils/afbinit/Makefile
+++ b/sysutils/afbinit/Makefile
@@ -7,6 +7,7 @@
PORTNAME= afbinit
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= sysutils graphics
MASTER_SITES= ${MASTER_SITE_DEBIAN}
MASTER_SITE_SUBDIR= pool/contrib/a/afbinit
diff --git a/sysutils/afbinit/files/patch-afbinit.c b/sysutils/afbinit/files/patch-afbinit.c
index a26aac113849..bc2b2857c452 100644
--- a/sysutils/afbinit/files/patch-afbinit.c
+++ b/sysutils/afbinit/files/patch-afbinit.c
@@ -60,6 +60,24 @@ This patch is based on code marked:
if(ucode == NULL) {
fprintf(stderr, "Cannot malloc %d bytes for UCODE.\n",
ucheader.ucode_words << 2);
+@@ -236,7 +237,7 @@
+ /* MMAP the registers. */
+ uregs = mmap(0, 0x2000,
+ PROT_READ | PROT_WRITE,
+- MAP_PRIVATE,
++ MAP_SHARED,
+ afb_fd,
+ 0x04000000);
+ if (uregs == (void *)-1L) {
+@@ -246,7 +247,7 @@
+
+ kregs = mmap(0, 0x2000,
+ PROT_READ | PROT_WRITE,
+- MAP_PRIVATE,
++ MAP_SHARED,
+ afb_fd,
+ 0x0bc04000);
+ if (kregs == (void *)-1L) {
@@ -254,14 +255,26 @@
exit(1);
}