--- src/gdb/rdi-share/devsw.c.orig	2006-09-24 14:27:38.000000000 +0300
+++ src/gdb/rdi-share/devsw.c	2006-09-24 14:27:58.000000000 +0300
@@ -267,7 +267,7 @@
 
     /* Free memory */
     free ((char *) device->SwitcherState);
-    device->SwitcherState = 0x0;
+    ((DeviceDescr*)device)->SwitcherState = 0x0;
 
     /* that's all */
     return adp_ok;
--- src/mmalloc/mmap-sup.c.orig	2006-09-24 13:36:16.000000000 +0300
+++ src/mmalloc/mmap-sup.c	2006-09-24 13:36:42.000000000 +0300
@@ -31,6 +31,7 @@
 #endif
 
 #include "mmprivate.h"
+#include <sys/types.h>
 
 /* Cache the pagesize for the current host machine.  Note that if the host
    does not readily provide a getpagesize() function, we need to emulate it
--- src/libiberty/strerror.c.orig	2006-09-24 13:20:39.000000000 +0300
+++ src/libiberty/strerror.c	2006-09-24 13:20:56.000000000 +0300
@@ -462,8 +462,10 @@
 
 #else
 
+/*
 extern int sys_nerr;
 extern char *sys_errlist[];
+*/
 
 #endif
 
