[cvsnt-dev] compiling mdns_apple.cpp on Mac OS X
Jens Miltner
jum at mac.com
Fri Jan 12 10:30:34 GMT 2007
Am 12.01.2007 um 11:26 schrieb Antonio Patane':
> What you want????
What I want? I wanted to start a discussion on how to properly solve
this problem, since I couldn't come up with the "perfect" solution.
Didn't realize this was not clear from my message....
</jum>
>
>
> ----- Original Message ----- From: "Jens Miltner" <jum at mac.com>
> To: <cvsnt-dev at cvsnt.org>
> Sent: Friday, January 12, 2007 11:04 AM
> Subject: [cvsnt-dev] compiling mdns_apple.cpp on Mac OS X
>
>
>> Is anybody else having this problem:
>> When I try to build cvsnt, I get errors while compiling
>> mdns_apple.cpp due to confliciting definitions of constants:
>>> apple/mdns_apple.cpp:36: error: conflicting declaration
>>> 'kDNSServiceClass_IN'
>>> /usr/include/dns_sd.h:144: error: 'kDNSServiceClass_IN' has a
>>> previous declaration as '<anonymous enum> kDNSServiceClass_IN'
>>> apple/mdns_apple.cpp:37: error: conflicting declaration
>>> 'kDNSServiceType_A'
>>> /usr/include/dns_sd.h:149: error: 'kDNSServiceType_A' has a
>>> previous declaration as '<anonymous enum> kDNSServiceType_A'
>>> apple/mdns_apple.cpp:38: error: conflicting declaration
>>> 'kDNSServiceType_AAAA'
>>> /usr/include/dns_sd.h:176: error: 'kDNSServiceType_AAAA' has a
>>> previous declaration as '<anonymous enum> kDNSServiceType_AAAA'
>>> apple/mdns_apple.cpp:39: error: conflicting declaration
>>> 'kDNSServiceType_SRV'
>>> /usr/include/dns_sd.h:181: error: 'kDNSServiceType_SRV' has a
>>> previous declaration as '<anonymous enum> kDNSServiceType_SRV'
>> Sure enough, the source file contains this definition:
>>> #ifdef __APPLE__
>>> // Bizarrely, OSX doesn't define these...
>>> enum
>>> {
>>> kDNSServiceClass_IN = 1, /* Internet */
>>> kDNSServiceType_A = 1, /* Host address. */
>>> kDNSServiceType_AAAA = 28, /* Ip6 Address. */
>>> kDNSServiceType_SRV = 33, /* Server Selection. */
>>> };
>>> #endif
>> However, in my system configuration (Mac OS X 10.4.7, Xcode
>> 4.1), / usr/include/dns_sd.h DOES contain the constant
>> definitions, so these are duplicates, which gcc-4.0 doesn't seem
>> to like a lot...
>> So far I've been working around this by disabling mdns support,
>> but I really think this should be solved somehow by either
>> conditionally defining the constants in mdns_apple.cpp only if
>> it's not defined by the system (would need some macro to test
>> for, either from the system headers, or defined from the
>> configure script, both of which I have no idea about) or,
>> alternatively, require the latest SDKs for building csvnt (also
>> probably not the perfect solution).
>> Since I'm using the "build-mac-multi" script in the osx directory,
>> I wonder whether anybody else is having the same problem.
>> </jum>
>> _______________________________________________
>> cvsnt-dev mailing list
>> cvsnt-dev at cvsnt.org
>> http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt-dev
>>
More information about the cvsnt-dev
mailing list