This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


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 V3] sunrpc/rpc/types.h: Fix OS X and FreeBSD build problem.


When I build arm-linux-gcc on OS X, I find glibc will get a build error
in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK.
For FreeBSD, Add __FreeBSD__ to make it build OK, too.

ChangeLog:

2013-09-06   Jia Liu  <proljc@gmail.com>

       * sunrpc/rpc/types.h [__APPLE_CC__]: Define u_char when __APPLE_CC__
       is defined.
       * sunrpc/rpc/types.h [__FreeBSD__]: Ditto.

Version History:
V3:
Addressed Mike's review comments:
- Fix it in a simpler way, define __u_char_defined and __daddr_t_defined
when __APPLE_CC__ or __FreeBSD__ is defined.

V2:
Addressed Andreas's review comments:
- Fix ChangeLog.

Addressed Mike's review comments:
- Handled __u_char_defined and __daddr_t_defined separately.

Addressed Abdoulaye's review comments:
- Add __FreeBSD__ to fix FreeBSD build.

Signed-off-by: Jia Liu <proljc@gmail.com>
---
 sunrpc/rpc/types.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h
index 3dca5c4..beded52 100644
--- a/sunrpc/rpc/types.h
+++ b/sunrpc/rpc/types.h
@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t;
 #include <sys/types.h>
 #endif
 
+#if defined __APPLE_CC__ || defined __FreeBSD__
+# define __u_char_defined
+# define __daddr_t_defined
+#endif
+
 #ifndef __u_char_defined
 typedef __u_char u_char;
 typedef __u_short u_short;
-- 
1.7.12.4 (Apple Git-37)


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