diff -r -u code.orig/prmcfr.h code/prmcfr.h
--- code.orig/prmcfr.h	Tue Jun 18 08:36:21 2002
+++ code/prmcfr.h	Tue Mar  9 09:27:25 2004
@@ -11,6 +11,7 @@
 
 #include "mpm.h"
 
+#include <ucontext.h>
 #include <signal.h>
 
 typedef struct MutatorFaultContextStruct { /* Protection fault context data */
diff -r -u code.orig/prmci3li.c code/prmci3li.c
--- code.orig/prmci3li.c	Tue Jun 18 08:36:22 2002
+++ code/prmci3li.c	Thu May 13 15:20:20 2004
@@ -73,7 +73,11 @@
   /* cr2 contains the address which caused the fault. */
   /* See .source.i486 (9.9.14) and */
   /* .source.linux.kernel (linux/arch/i386/mm/fault.c). */
+#if 0
   *faultmemReturn = (MRef)scp->cr2;
+#else
+  *faultmemReturn = (MRef)scp->err;
+#endif
   *insvecReturn = (Byte*)scp->eip;
 }
 
diff -r -u code.orig/protfri3.c code/protfri3.c
--- code.orig/protfri3.c	Tue Jun 18 08:36:22 2002
+++ code/protfri3.c	Tue Mar  9 09:33:47 2004
@@ -25,6 +25,7 @@
 
 #include <signal.h>
 #include <machine/trap.h>
+#include <stdlib.h>
 
 SRCID(protfri3, "$Id: //info.ravenbrook.com/project/mps/master/code/protfri3.c#7 $");
 
diff -r -u code.orig/protlii3.c code/protlii3.c
--- code.orig/protlii3.c	Tue Jun 18 08:36:22 2002
+++ code/protlii3.c	Thu May 13 14:08:38 2004
@@ -88,6 +88,7 @@
 
     mfContext.scp = &context;
 
+#if 0
     mode = ((context.err & PAGE_FAULT_ERR_WRITE) != 0)  /* .sigh.context */
              ? (AccessREAD | AccessWRITE)
              : AccessREAD;
@@ -95,6 +96,13 @@
     /* We assume that the access is for one word at the address. */
     base = (Addr)context.cr2;   /* .sigh.addr */
     limit = AddrAdd(base, (Size)sizeof(Addr));
+#else
+    mode = AccessREAD | AccessWRITE; /* .sigh.mode */
+
+    /* We assume that the access is for one word at the address. */
+    base = (Addr)context.err;   /* .sigh.addr */
+    limit = AddrAdd(base, (Size)sizeof(Addr));
+#endif
 
     /* Offer each protection structure the opportunity to handle the */
     /* exception.  If it succeeds, then allow the mutator to continue. */
