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 2 of 2] libc/eglibc: [OS X] Don't Redefine Already Defined Types in rpc/types.h


# HG changeset patch
# User Philip Belemezov <philip@belemezov.net>
# Date 1364300929 -7200
# Node ID 0926f7ff958ad637d4727e4e02ed2900ce29291a
# Parent  fcdf7fc7fd1c00715c3d9651ff00d805ecfb8aa8
libc/eglibc: [OS X] Don't Redefine Already Defined Types in rpc/types.h

Apple already defines the u_char, u_short, etc. types in <sys/types.h>.
However, those are defined directly, without using the __u_char types.

So, don't even try to define those on OS X.


Signed-Off-By: Philip Belemezov <philip@belemezov.net>

diff -r fcdf7fc7fd1c -r 0926f7ff958a patches/eglibc/2_17/osx_do_not_redefine_types_sunrpc.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/eglibc/2_17/osx_do_not_redefine_types_sunrpc.patch	Tue Mar 26 14:28:49 2013 +0200
@@ -0,0 +1,39 @@
+Apple already defines the u_char, u_short, etc. types in <sys/types.h>.
+However, those are defined directly, without using the __u_char types.
+
+diff -Naur eglibc-2_17-old/sunrpc/rpc/types.h eglibc-2_17-new/sunrpc/rpc/types.h
+--- eglibc-2_17-old/sunrpc/rpc/types.h	2010-08-19 23:32:31.000000000 +0300
++++ eglibc-2_17-new/sunrpc/rpc/types.h	2013-03-26 01:16:16.000000000 +0200
+@@ -69,7 +69,11 @@
+ #include <sys/types.h>
+ #endif
+ 
+-#ifndef __u_char_defined
++/*
++ * OS X already has these <sys/types.h>
++ */
++#ifndef __APPLE__
++# ifndef __u_char_defined
+ typedef __u_char u_char;
+ typedef __u_short u_short;
+ typedef __u_int u_int;
+@@ -77,13 +81,14 @@
+ typedef __quad_t quad_t;
+ typedef __u_quad_t u_quad_t;
+ typedef __fsid_t fsid_t;
+-# define __u_char_defined
+-#endif
+-#ifndef __daddr_t_defined
++#  define __u_char_defined
++# endif
++# ifndef __daddr_t_defined
+ typedef __daddr_t daddr_t;
+ typedef __caddr_t caddr_t;
+-# define __daddr_t_defined
+-#endif
++#  define __daddr_t_defined
++# endif
++#endif /* __APPLE__ */
+ 
+ #include <sys/time.h>
+ #include <sys/param.h>

--
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]