--- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c	2007-10-06 12:26:14.000000000 +0200
+++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c	2007-10-06 12:27:36.000000000 +0200
@@ -29,7 +29,6 @@
 #include <stdarg.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/sysmacros.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/mman.h>
@@ -42,6 +41,11 @@
 #define DEFAULT_MAJOR_ROOT 0
 #define DEFAULT_MINOR_ROOT 0
 
+#undef major
+#define major(dev) ((int)(((dev) >> 8) & 0xff))
+#undef minor
+#define minor(dev) ((int)((dev) & 0xff))
+
 /* Minimal number of setup sectors */
 #define SETUP_SECT_MIN 5
 #define SETUP_SECT_MAX 64
