[libvirt] IPv6 structs on MacOS X
Eric Blake
eblake at redhat.com
Wed Sep 15 20:32:07 UTC 2010
On 09/15/2010 02:29 PM, Justin Clift wrote:
> On 09/16/2010 04:52 AM, Bruno Haible wrote:
> <snip>
>> This message talks about the unportability of a field 's6_addr32' in
>> 'struct in6_addr'. Sure this is unportable: POSIX [1] specifies only the
>> presence of 's6_addr'.
>>
>> I don't see why gnulib should support this: An application can perfectly
>> access the 16 bytes of the s6_addr[] array. Why would it need to access a
>> specific part of it in a special way?
>
> My apologies. I should have been significantly clearer in what I was
> trying for there. :)
>
> (adding the libvirt devel mailing list back in, due to relevance)
>
> Tried compiling libvirt on OS X, which errored on this piece of IPv6 code:
>
> http://www.redhat.com/archives/libvir-list/2010-September/msg00243.html
>
> The message I quoted to Eric above, which you've then looked at, was
> danpb wondering whether we should be using gnulib to avoid the
> portability problem.
I agree with Bruno - the portability problem stems from using a field
member not specified by POSIX in the first place. It should be
sufficiently easy to rewrite the offending libvirt code to use only the
portable interfaces, without burdening gnulib with the effort of
supporting multi-byte alias names for the same data.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list