--- afbinit-1.0.orig/afbinit.c
+++ afbinit-1.0/afbinit.c
@@ -13,6 +13,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
/* Define this to debug the microcode loading procedure. */
#undef DEBUG_UCODE_LOAD
@@ -236,7 +238,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 +248,7 @@
kregs = mmap(0, 0x2000,
PROT_READ | PROT_WRITE,
- MAP_PRIVATE,
+ MAP_SHARED,
afb_fd,
0x0bc04000);
if (kregs == (void *)-1L) {