diff options
author | Waldemar Brodkorb <mail@waldemar-brodkorb.de> | 2012-08-10 03:52:29 +0200 |
---|---|---|
committer | Waldemar Brodkorb <mail@waldemar-brodkorb.de> | 2012-08-10 03:52:29 +0200 |
commit | 62eda65923410d85e9122f6454461e3064bef9d6 (patch) | |
tree | a6f5813cfc96466bbe4352acd476fb0773ecd2a1 /toolchain/glibc/patches/glibc-cross.patch | |
parent | 3c087553827269f44021cb5204860e32ea864eb7 (diff) |
update glibc
Diffstat (limited to 'toolchain/glibc/patches/glibc-cross.patch')
-rw-r--r-- | toolchain/glibc/patches/glibc-cross.patch | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/toolchain/glibc/patches/glibc-cross.patch b/toolchain/glibc/patches/glibc-cross.patch new file mode 100644 index 000000000..f8e0c2416 --- /dev/null +++ b/toolchain/glibc/patches/glibc-cross.patch @@ -0,0 +1,99 @@ +diff -Nur glibc-2.16.0.orig/sunrpc/rpc/types.h glibc-2.16.0/sunrpc/rpc/types.h +--- glibc-2.16.0.orig/sunrpc/rpc/types.h 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/rpc/types.h 2012-08-01 18:05:49.000000000 +0200 +@@ -69,19 +69,25 @@ + #include <sys/types.h> + #endif + +-#ifndef __u_char_defined +-typedef __u_char u_char; +-typedef __u_short u_short; +-typedef __u_int u_int; +-typedef __u_long u_long; +-typedef __quad_t quad_t; +-typedef __u_quad_t u_quad_t; +-typedef __fsid_t fsid_t; +-# define __u_char_defined ++typedef unsigned char u_char; ++typedef unsigned short u_short; ++typedef unsigned int u_int; ++typedef unsigned long u_long; ++#if __WORDSIZE == 64 ++typedef long int quad_t; ++typedef unsigned long int u_quad_t; ++#elif defined __GLIBC_HAVE_LONG_LONG ++typedef long long int quad_t; ++typedef unsigned long long int u_quad_t; ++#endif ++#if defined(_CROSS_RPCGEN_) ++typedef u_quad_t fsid_t; + #endif +-#ifndef __daddr_t_defined +-typedef __daddr_t daddr_t; +-typedef __caddr_t caddr_t; ++ ++# define __u_char_defined ++#if !defined(__daddr_t_defined) && defined(linux) ++typedef long int daddr_t; ++typedef char *caddr_t; + # define __daddr_t_defined + #endif + +diff -Nur glibc-2.16.0.orig/sunrpc/rpc_clntout.c glibc-2.16.0/sunrpc/rpc_clntout.c +--- glibc-2.16.0.orig/sunrpc/rpc_clntout.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/rpc_clntout.c 2012-08-01 18:05:49.000000000 +0200 +@@ -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 glibc-2.16.0.orig/sunrpc/rpc_main.c glibc-2.16.0/sunrpc/rpc_main.c +--- glibc-2.16.0.orig/sunrpc/rpc_main.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/rpc_main.c 2012-08-01 18:05:49.000000000 +0200 +@@ -38,7 +38,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> +@@ -958,10 +962,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 glibc-2.16.0.orig/sunrpc/rpc_scan.c glibc-2.16.0/sunrpc/rpc_scan.c +--- glibc-2.16.0.orig/sunrpc/rpc_scan.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/rpc_scan.c 2012-08-01 18:05:49.000000000 +0200 +@@ -37,7 +37,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" |