diff -urN kernel-source-2.2.13.orig/include/asm-sparc/io.h kernel-source-2.2.13/include/asm-sparc/io.h
--- kernel-source-2.2.13.orig/include/asm-sparc/io.h	Sun Oct  4 13:22:44 1998
+++ kernel-source-2.2.13/include/asm-sparc/io.h	Tue Dec 28 11:11:34 1999
@@ -95,6 +95,7 @@
        return writel(b,addr);
 }
 
+#ifdef __KERNEL__
 #define inb_p inb
 #define outb_p outb
 
@@ -158,6 +159,8 @@
 	*dvmaaddr_p = (__u32) cpuaddr;
 	return cpuaddr;
 }
+
+#endif /* __KERNEL__ */
 
 #define virt_to_phys(x) __pa((unsigned long)(x))
 #define phys_to_virt(x) __va((unsigned long)(x))
diff -urN kernel-source-2.2.13.orig/include/asm-sparc/ptrace.h kernel-source-2.2.13/include/asm-sparc/ptrace.h
--- kernel-source-2.2.13.orig/include/asm-sparc/ptrace.h	Mon Mar 17 17:54:31 1997
+++ kernel-source-2.2.13/include/asm-sparc/ptrace.h	Tue Dec 28 11:14:49 1999
@@ -146,10 +146,13 @@
 /* Stuff for the ptrace system call */
 #define PTRACE_SUNATTACH	  10
 #define PTRACE_SUNDETACH	  11
+/* BMC: silly hack that I hate */
+#if !(defined (__GLIBC__) && __GLIBC__ >= 2)
 #define PTRACE_GETREGS            12
 #define PTRACE_SETREGS            13
 #define PTRACE_GETFPREGS          14
 #define PTRACE_SETFPREGS          15
+#endif /* ! GLIBC 2 */
 #define PTRACE_READDATA           16
 #define PTRACE_WRITEDATA          17
 #define PTRACE_READTEXT           18
diff -u -r1.8 string.h
--- linux-2.2/include/linux/string.h~	1999/06/27 00:38:46	1.8
+++ linux-2.2/include/linux/string.h	2000/01/05 15:48:51
@@ -10,7 +10,11 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-
+/* Bah, now we have things like fdisk trying to include genhd.h which
+ * eventually includes this file in a chain of #includes, and this breaks
+ * when it encounters the glibc macros
+ */
+#ifdef __KERNEL__
 extern char * ___strtok;
 extern char * strcpy(char *,const char *);
 extern char * strncpy(char *,const char *, __kernel_size_t);
@@ -34,7 +38,7 @@
 extern void * memmove(void *,const void *,__kernel_size_t);
 extern void * memscan(void *,int,__kernel_size_t);
 extern int memcmp(const void *,const void *,__kernel_size_t);
-
+#endif /* __KERNEL__ */
 /*
  * Include machine specific inline routines
  */
