diff options
author | Esben Haabendal <eha@dev.doredevelopment.dk> | 2011-04-06 20:15:23 +0200 |
---|---|---|
committer | Esben Haabendal <eha@dev.doredevelopment.dk> | 2011-04-06 20:15:23 +0200 |
commit | 42e908c44b265f8e0b822b4c0f56e0caa7f9f304 (patch) | |
tree | faf91cd9ad0863bbb98c5992508968faa7426996 /patches | |
parent | c0800dc7b51019fea1ea09843031e7cb0a8d62e6 (diff) | |
download | crosstool-ng-42e908c44b265f8e0b822b4c0f56e0caa7f9f304.tar.gz crosstool-ng-42e908c44b265f8e0b822b4c0f56e0caa7f9f304.tar.bz2 crosstool-ng-42e908c44b265f8e0b822b4c0f56e0caa7f9f304.zip |
libc/glibc: workaround for autoconf'ed define of caddr_t
When building canadian cross compiler, I have some trouble with
configure defining caddr_t as a macro, like:
#define caddr_t char *
When combined with the types.h where caddr_t is protected together
with daddr_t, the typedef of caddr_t breaks.
This patch works around it by protecting the caddr_t typedef
specifically.
I am uncertain as to the real cause and solution to this :-(
Signed-off-by: Esben Haabendal <eha@dev.doredevelopment.dk>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/glibc/2.10.1/910-typedef-caddr.patch | 28 | ||||
-rw-r--r-- | patches/glibc/2.11.1/910-typedef-caddr.patch | 28 | ||||
-rw-r--r-- | patches/glibc/2.11/910-typedef-caddr.patch | 28 | ||||
-rw-r--r-- | patches/glibc/2.12.1/910-typedef-caddr.patch | 28 | ||||
-rw-r--r-- | patches/glibc/2.12.2/910-typedef-caddr.patch | 28 | ||||
-rw-r--r-- | patches/glibc/2.9/910-typedef-caddr.patch | 28 |
6 files changed, 168 insertions, 0 deletions
diff --git a/patches/glibc/2.10.1/910-typedef-caddr.patch b/patches/glibc/2.10.1/910-typedef-caddr.patch new file mode 100644 index 00000000..503b5d47 --- /dev/null +++ b/patches/glibc/2.10.1/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.10.1-orig/posix/sys/types.h glibc-2.10.1/posix/sys/types.h +--- glibc-2.10.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.10.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.10.1-orig/sunrpc/rpc/types.h glibc-2.10.1/sunrpc/rpc/types.h +--- glibc-2.10.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.10.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/patches/glibc/2.11.1/910-typedef-caddr.patch b/patches/glibc/2.11.1/910-typedef-caddr.patch new file mode 100644 index 00000000..4cddbc36 --- /dev/null +++ b/patches/glibc/2.11.1/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.11.1-orig/posix/sys/types.h glibc-2.11.1/posix/sys/types.h +--- glibc-2.11.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.11.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.11.1-orig/sunrpc/rpc/types.h glibc-2.11.1/sunrpc/rpc/types.h +--- glibc-2.11.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.11.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/patches/glibc/2.11/910-typedef-caddr.patch b/patches/glibc/2.11/910-typedef-caddr.patch new file mode 100644 index 00000000..eb6cc6ee --- /dev/null +++ b/patches/glibc/2.11/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.11-orig/posix/sys/types.h glibc-2.11/posix/sys/types.h +--- glibc-2.11-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.11/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.11-orig/sunrpc/rpc/types.h glibc-2.11/sunrpc/rpc/types.h +--- glibc-2.11-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.11/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/patches/glibc/2.12.1/910-typedef-caddr.patch b/patches/glibc/2.12.1/910-typedef-caddr.patch new file mode 100644 index 00000000..e29e8101 --- /dev/null +++ b/patches/glibc/2.12.1/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h +--- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h +--- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/patches/glibc/2.12.2/910-typedef-caddr.patch b/patches/glibc/2.12.2/910-typedef-caddr.patch new file mode 100644 index 00000000..4bc75cbd --- /dev/null +++ b/patches/glibc/2.12.2/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.12.2-orig/posix/sys/types.h glibc-2.12.2/posix/sys/types.h +--- glibc-2.12.2-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.2/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.12.2-orig/sunrpc/rpc/types.h glibc-2.12.2/sunrpc/rpc/types.h +--- glibc-2.12.2-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.2/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + diff --git a/patches/glibc/2.9/910-typedef-caddr.patch b/patches/glibc/2.9/910-typedef-caddr.patch new file mode 100644 index 00000000..5075c748 --- /dev/null +++ b/patches/glibc/2.9/910-typedef-caddr.patch @@ -0,0 +1,28 @@ +diff -urN glibc-2.9-orig/posix/sys/types.h glibc-2.9/posix/sys/types.h +--- glibc-2.9-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.9/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200 +@@ -114,7 +114,10 @@ + #ifdef __USE_BSD + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif +diff -urN glibc-2.9-orig/sunrpc/rpc/types.h glibc-2.9/sunrpc/rpc/types.h +--- glibc-2.9-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.9/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200 +@@ -80,7 +80,10 @@ + #endif + #ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + #endif + |