1 Index: linux-2.6.15gum/scripts/Makefile.host
2 ===================================================================
3 --- linux-2.6.15gum.orig/scripts/Makefile.host
4 +++ linux-2.6.15gum/scripts/Makefile.host
5 @@ -137,15 +137,17 @@ $(host-cxxobjs): %.o: %.cc FORCE
7 # Compile .c file, create position independent .o file
9 -quiet_cmd_host-cshobjs = HOSTCC -fPIC $@
10 - cmd_host-cshobjs = $(HOSTCC) $(hostc_flags) -fPIC -c -o $@ $<
11 +quiet_cmd_host-cshobjs = HOSTCC -fPIC -fno-common $@
12 + cmd_host-cshobjs = $(HOSTCC) $(hostc_flags) -fPIC -fno-common -c -o $@ $<
13 $(host-cshobjs): %.o: %.c FORCE
14 $(call if_changed_dep,host-cshobjs)
16 # Link a shared library, based on position independent .o files
17 # *.o -> .so shared library (host-cshlib)
18 -quiet_cmd_host-cshlib = HOSTLLD -shared $@
19 - cmd_host-cshlib = $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \
20 +SHARED_SWITCH = `if $(HOSTCC) -dM -E - < /dev/null | grep -q APPLE; \
21 + then echo "-dynamiclib"; else echo "-shared"; fi`
22 +quiet_cmd_host-cshlib = HOSTLLD $(SHARED_SWITCH) $@
23 + cmd_host-cshlib = $(HOSTCC) $(HOSTLDFLAGS) $(SHARED_SWITCH) -o $@ \
24 $(addprefix $(obj)/,$($(@F:.so=-objs))) \
25 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
26 $(host-cshlib): %: $(host-cshobjs) FORCE
27 Index: linux-2.6.15gum/Makefile
28 ===================================================================
29 --- linux-2.6.15gum.orig/Makefile
30 +++ linux-2.6.15gum/Makefile
31 @@ -203,7 +203,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
35 -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
36 +HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter "`$(CC) -print-file-name=include`/../../../../../include/"
40 # Decide whether to build built-in, modular, or both.
41 Index: linux-2.6.15gum/scripts/mod/sumversion.c
42 ===================================================================
43 --- linux-2.6.15gum.orig/scripts/mod/sumversion.c
44 +++ linux-2.6.15gum/scripts/mod/sumversion.c
46 -#include <netinet/in.h>
47 +#include <arpa/inet.h>