This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sunrpc/rpc/types.h: Fix OS X build problem.
- From: Jia Liu <proljc at gmail dot com>
- To: Abdoulaye Walsimou Gaye <awg at embtoolkit dot org>
- Cc: libc-alpha at sourceware dot org, Mike Frysinger <vapier at gentoo dot org>
- Date: Thu, 5 Sep 2013 21:39:00 +0800
- Subject: Re: [PATCH] sunrpc/rpc/types.h: Fix OS X build problem.
- Authentication-results: sourceware.org; auth=none
- References: <1378366884-29968-1-git-send-email-proljc at gmail dot com> <52286DA5 dot 8040802 at embtoolkit dot org>
Hi Abdoulaye,
On Thu, Sep 5, 2013 at 7:40 PM, Abdoulaye Walsimou Gaye
<awg@embtoolkit.org> wrote:
> Hello Jia,
>
>
> On 09/05/2013 09:41 AM, Jia Liu wrote:
>>
>> 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.
>>
>> ChangeLog:
>>
>> 2013-09-05 Jia Liu<proljc@gmail.com>
>>
>> * sunrpc/rpc/types.h (__APPLE_CC__): New variable.
>>
>> Signed-off-by: Jia Liu<proljc@gmail.com>
>> ---
>> sunrpc/rpc/types.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h
>> index 3dca5c4..c6304a7 100644
>> --- a/sunrpc/rpc/types.h
>> +++ b/sunrpc/rpc/types.h
>> @@ -69,6 +69,7 @@ typedef unsigned long rpcport_t;
>> #include<sys/types.h>
>> #endif
>>
>> +#ifndef __APPLE_CC__
>> #ifndef __u_char_defined
>> typedef __u_char u_char;
>> typedef __u_short u_short;
>> @@ -84,6 +85,7 @@ typedef __daddr_t daddr_t;
>> typedef __caddr_t caddr_t;
>> # define __daddr_t_defined
>> #endif
>> +#endif
>>
>
>
> Please not that I have similar local change to support build under
> __FreeBSD__. It would nice to also add || !defined(__FreeBSD__)
Is this code looks OK?
#if defined ( __APPLE_CC__ ) || defined( __FreeBSD__ )
# define __u_char_defined
#endif
And, Mike, how do you think?
>
> Thanks,
> awg
>
>
Regards,
Jia