summaryrefslogtreecommitdiff
path: root/toolchain/eglibc/patches/eglibc-cross.patch
blob: 6d74ec327a7d19e91535f00ba3d4d8c662e7688b (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
77
78
79
80
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc/types.h eglibc-2.18/libc/sunrpc/rpc/types.h
--- eglibc-2.18.orig/libc/sunrpc/rpc/types.h	2013-09-13 10:20:22.000000000 +0200
+++ eglibc-2.18/libc/sunrpc/rpc/types.h	2014-01-25 13:23:20.000000000 +0100
@@ -70,6 +70,7 @@
 #endif
 
 #ifndef __u_char_defined
+#if !defined(__APPLE__) && !defined(__BSD__)
 typedef __u_char u_char;
 typedef __u_short u_short;
 typedef __u_int u_int;
@@ -79,11 +80,14 @@
 typedef __fsid_t fsid_t;
 # define __u_char_defined
 #endif
+#endif
 #ifndef __daddr_t_defined
+#if !defined(__APPLE__) && !defined(__BSD__)
 typedef __daddr_t daddr_t;
 typedef __caddr_t caddr_t;
 # define __daddr_t_defined
 #endif
+#endif
 
 #include <sys/time.h>
 #include <sys/param.h>
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_main.c eglibc-2.18/libc/sunrpc/rpc_main.c
--- eglibc-2.18.orig/libc/sunrpc/rpc_main.c	2013-09-13 10:20:22.000000000 +0200
+++ eglibc-2.18/libc/sunrpc/rpc_main.c	2014-01-25 09:57:31.000000000 +0100
@@ -38,7 +38,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
-#include <libintl.h>
 #include <locale.h>
 #include <ctype.h>
 #include <sys/types.h>
@@ -51,6 +50,8 @@
 #include "rpc_scan.h"
 #include "proto.h"
 
+#define gettext(X) (X)
+
 #include "../version.h"
 #define PACKAGE _libc_intl_domainname
 
@@ -958,10 +959,12 @@
 	abort ();
       temp = rindex (cmd->infile, '.');
       cp = stpcpy (mkfilename, "Makefile.");
-      if (temp != NULL)
-	*((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
-      else
+      if (temp != NULL) {
+	strncpy (cp, cmd->infile, temp - cmd->infile);
+	cp[temp - cmd->infile - 1] = '\0';
+      } else {
 	stpcpy (cp, cmd->infile);
+      }
 
     }
   else
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_scan.c eglibc-2.18/libc/sunrpc/rpc_scan.c
--- eglibc-2.18.orig/libc/sunrpc/rpc_scan.c	2013-09-13 10:20:22.000000000 +0200
+++ eglibc-2.18/libc/sunrpc/rpc_scan.c	2014-01-25 09:57:31.000000000 +0100
@@ -37,12 +37,13 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
-#include <libintl.h>
 #include "rpc_scan.h"
 #include "rpc_parse.h"
 #include "rpc_util.h"
 #include "proto.h"
 
+#define gettext(X) (X)
+
 #define startcomment(where) (where[0] == '/' && where[1] == '*')
 #define endcomment(where) (where[-1] == '*' && where[0] == '/')