summaryrefslogtreecommitdiff
path: root/toolchain/eglibc/patches/eglibc-cross.patch
blob: c09b2f7520010b131d2b1669252856f5ed358820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h eglibc-2.11.1/libc/sunrpc/rpc/types.h
--- eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h	2010-02-24 08:09:59.000000000 +0100
+++ eglibc-2.11.1/libc/sunrpc/rpc/types.h	2010-03-22 18:30:14.944408497 +0100
@@ -68,6 +68,7 @@
 #include <sys/types.h>
 #endif
 
+#if !defined(_CROSS_RPCGEN_)
 #ifndef __u_char_defined
 typedef __u_char u_char;
 typedef __u_short u_short;
@@ -83,6 +84,7 @@
 typedef __caddr_t caddr_t;
 # define __daddr_t_defined
 #endif
+#endif 
 
 #include <sys/time.h>
 #include <sys/param.h>
diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c eglibc-2.11.1/libc/sunrpc/rpc_clntout.c
--- eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c	2010-02-24 08:10:01.000000000 +0100
+++ eglibc-2.11.1/libc/sunrpc/rpc_clntout.c	2010-03-22 18:30:38.973160151 +0100
@@ -31,7 +31,7 @@
  */
 #include <stdio.h>
 #include <string.h>
-#include <rpc/types.h>
+#include "rpc/types.h"
 #include "rpc_parse.h"
 #include "rpc_util.h"
 #include "proto.h"
diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c
--- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c	2010-02-24 08:10:00.000000000 +0100
+++ eglibc-2.11.1/libc/sunrpc/rpc_main.c	2010-03-22 18:31:31.245661003 +0100
@@ -37,7 +37,11 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef _CROSS_RPCGEN_
+#define gettext(X) (X)
+#else
 #include <libintl.h>
+#endif
 #include <ctype.h>
 #include <sys/types.h>
 #include <sys/param.h>
diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rpc_scan.c
--- eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c	2010-02-24 08:10:00.000000000 +0100
+++ eglibc-2.11.1/libc/sunrpc/rpc_scan.c	2010-03-22 18:31:16.146907097 +0100
@@ -36,7 +36,11 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
+#ifdef _CROSS_RPCGEN_
+#define gettext(X) (X)
+#else
 #include <libintl.h>
+#endif
 #include "rpc_scan.h"
 #include "rpc_parse.h"
 #include "rpc_util.h"
diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/Makefile
--- eglibc-2.11.1.orig/libc/timezone/Makefile	2010-02-24 08:09:02.000000000 +0100
+++ eglibc-2.11.1/libc/timezone/Makefile	2010-03-22 18:50:04.134408513 +0100
@@ -181,8 +182,9 @@
 $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
 
 $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
-	gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
-		-DCROSS_ZIC $(compile-mkdep-flags)
+	gcc $< -c $(OUTPUT_OPTION) \
+		$(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) \
+		$(CPPFLAGS-$*) -DCROSS_ZIC $(compile-mkdep-flags)
 
 $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
 	gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@