1 Index: linux-2.6.21.7/scripts/genksyms/parse.c_shipped
2 ===================================================================
3 --- linux-2.6.21.7.orig/scripts/genksyms/parse.c_shipped
4 +++ linux-2.6.21.7/scripts/genksyms/parse.c_shipped
14 static int is_typedef;
15 Index: linux-2.6.21.7/scripts/genksyms/parse.y
16 ===================================================================
17 --- linux-2.6.21.7.orig/scripts/genksyms/parse.y
18 +++ linux-2.6.21.7/scripts/genksyms/parse.y
28 static int is_typedef;
29 Index: linux-2.6.21.7/scripts/kallsyms.c
30 ===================================================================
31 --- linux-2.6.21.7.orig/scripts/kallsyms.c
32 +++ linux-2.6.21.7/scripts/kallsyms.c
38 +/* Darwin has no memmem implementation, this one is ripped of the uClibc-0.9.28 source */
39 +void *memmem (const void *haystack, size_t haystack_len,
40 + const void *needle, size_t needle_len)
43 + const char *const last_possible
44 + = (const char *) haystack + haystack_len - needle_len;
46 + if (needle_len == 0)
47 + /* The first occurrence of the empty string is deemed to occur at
48 + the beginning of the string. */
49 + return (void *) haystack;
51 + /* Sanity check, otherwise the loop might search through the whole
53 + if (__builtin_expect (haystack_len < needle_len, 0))
56 + for (begin = (const char *) haystack; begin <= last_possible; ++begin)
57 + if (begin[0] == ((const char *) needle)[0] &&
58 + !memcmp ((const void *) &begin[1],
59 + (const void *) ((const char *) needle + 1),
61 + return (void *) begin;
67 #define KSYM_NAME_LEN 127
69 Index: linux-2.6.21.7/scripts/kconfig/Makefile
70 ===================================================================
71 --- linux-2.6.21.7.orig/scripts/kconfig/Makefile
72 +++ linux-2.6.21.7/scripts/kconfig/Makefile
73 @@ -87,6 +87,9 @@ check-lxdialog := $(srctree)/$(src)/lxd
74 # we really need to do so. (Do not call gcc as part of make mrproper)
75 HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
76 HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
77 +ifeq ($(shell uname -s),Darwin)
78 +HOST_LOADLIBES += -lncurses
81 HOST_EXTRACFLAGS += -DLOCALE
83 Index: linux-2.6.21.7/scripts/mod/file2alias.c
84 ===================================================================
85 --- linux-2.6.21.7.orig/scripts/mod/file2alias.c
86 +++ linux-2.6.21.7/scripts/mod/file2alias.c
87 @@ -37,7 +37,21 @@ typedef unsigned char __u8;
88 * even potentially has different endianness and word sizes, since
89 * we handle those differences explicitly below */
90 #include "../../include/linux/mod_devicetable.h"
92 #include "../../include/linux/input.h"
96 +#define KEY_MIN_INTERESTING KEY_MUTE
97 +#define KEY_MAX 0x1ff
100 +#define MSC_MAX 0x07
101 +#define LED_MAX 0x0f
102 +#define SND_MAX 0x07
107 #define ADD(str, sep, cond, field) \
109 Index: linux-2.6.21.7/scripts/mod/mk_elfconfig.c
110 ===================================================================
111 --- linux-2.6.21.7.orig/scripts/mod/mk_elfconfig.c
112 +++ linux-2.6.21.7/scripts/mod/mk_elfconfig.c
120 +#include "../../../../../tools/sstrip/include/elf.h"
124 main(int argc, char **argv)
125 Index: linux-2.6.21.7/scripts/mod/modpost.h
126 ===================================================================
127 --- linux-2.6.21.7.orig/scripts/mod/modpost.h
128 +++ linux-2.6.21.7/scripts/mod/modpost.h
130 #include <sys/mman.h>
136 +#include "../../../../../tools/sstrip/include/elf.h"
139 #include "elfconfig.h"
141 Index: linux-2.6.21.7/scripts/mod/sumversion.c
142 ===================================================================
143 --- linux-2.6.21.7.orig/scripts/mod/sumversion.c
144 +++ linux-2.6.21.7/scripts/mod/sumversion.c
154 * Stolen form Cryptographic API.