SOLVED: Re: CTDB build problem on AIX

William Jojo w.jojo at hvcc.edu
Fri Jun 5 00:40:17 GMT 2009



---- Original message ----
>Date: Thu, 04 Jun 2009 13:34:54 +0200
>From: "Stefan (metze) Metzmacher" <metze at samba.org>  
>Subject: Re: SOLVED: Re: CTDB build problem on AIX  
>To: William Jojo <w.jojo at hvcc.edu>
>Cc: samba-technical at lists.samba.org,ronnie sahlberg <ronniesahlberg at gmail.com>
>
>William Jojo schrieb:
>> Stefan (metze) Metzmacher wrote:
>>> William Jojo schrieb:
>>>  
>>>> William Jojo wrote:
>>>>    
>>>>> William Jojo wrote:
>>>>>      
>>>>>> The last successful version I built of CTDB was 1.0.77. I tried
>>>>>> 1.0.84 then 1.0.82 today and they both fail out trying to find the
>>>>>> getopt.h header file.
>>>>>>
>>>>>>         
>>>> Not my best day ever... Here's the correct patch against 1.0.84.
>>>>
>>>> <snip>
>>>> --- ./utils/ping_pong/ping_pong.c.orig  2009-06-03 19:15:51.000000000
>>>> -0400
>>>> +++ ./utils/ping_pong/ping_pong.c       2009-06-03 19:16:18.000000000
>>>> -0400
>>>> @@ -37,7 +37,9 @@
>>>> #include <string.h>
>>>> #include <unistd.h>
>>>> #include <fcntl.h>
>>>> +#ifndef _AIX
>>>> #include <getopt.h>
>>>> +#endif
>>>> #include <sys/mman.h>
>>>>     
>>>
>>> Why do we need getopt.h at all then?
>>>   
>> Not sure, but it's part of glibc, so I assumed this was still necessary
>> for some Linuxes. Looks like a locking torture test by Tridge and added
>> to CTDB tree between 77 and 82. AIX doesn't have that header as the
>> portions are already defined in stdio.h, so I just ifdef'd around it for
>> the time being.
>
>'man 3 getopt' says getopt.h is only needed for getopt_long() and
>getopt_long_only() and getopt() is defined in unistd.h.
>
>maybe we should remove it completely then instead of having system
>specific #ifdef's.
>

+1 here - simpler is better.


Cheers,
Bill



More information about the samba-technical mailing list