This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] libc/eglibc-2.15: add caddr_t protection (include/sys/types.h)


# HG changeset patch
# User Matthieu Crapet <mcrapet@gmail.com>
# Date 1339491615 -7200
# Node ID 7c05f9fdfdefa8d2d179c15f23f9aa0a2f04eb93
# Parent  d10afc5bcc2523f54f4af71f74d9a3920a680288
libc/eglibc-2.15: add caddr_t protection (include/sys/types.h)

Troubles happen on mingw32 host/target.

Related thread:
http://sourceware.org/ml/crossgcc/2011-12/msg00073.html

Similar patches can be found in:
crosstool-ng-linaro-1.13.1-2012.05-20120523/contrib/linaro/patches/prebuild/

Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>

diff -r d10afc5bcc25 -r 7c05f9fdfdef
patches/eglibc/2_15/200-caddr_t_protection.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/eglibc/2_15/200-caddr_t_protection.patch	Tue Jun 12
11:00:15 2012 +0200
@@ -0,0 +1,17 @@
+Workaround for mingw32 related builds
+
+diff --git a/libc/posix/sys/types.h b/libc/posix/sys/types.h
+index a7e9084..da97bc8 100644
+--- a/posix/sys/types.h
++++ b/posix/sys/types.h
+@@ -114,7 +114,10 @@ typedef __ssize_t ssize_t;
+ #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

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]