Re: [PATCH] Make sure struct sockaddr_in is defined on FreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/11/13 Eric Blake <eblake@xxxxxxxxxx>:
> On 11/13/2010 08:52 AM, Matthias Bolte wrote:
>> ---
>> Âsrc/util/network.h | Â Â4 ++++
>> Â1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/util/network.h b/src/util/network.h
>> index 0900e29..724a5f8 100644
>> --- a/src/util/network.h
>> +++ b/src/util/network.h
>> @@ -21,6 +21,10 @@
>> Â# include <netdb.h>
>> Â# include <stdbool.h>
>>
>> +# ifdef __FreeBSD__
>> +# Âinclude <netinet/in.h>
>> +# endif
>> +
>
> NACK as written. ÂPOSIX states that <netdb.h> may, but not must, define
> sockaddr_in.
>
> Therefore, the correct fix is to unconditionally include <netinet/in.h>,
> which is the only header guaranteed by POSIX to declare that struct.
> (That is, turn your four-line addition into a two-line addition - it
> doesn't hurt to make the include unconditional). ÂACK with that change.
>

Okay, I removed the condition and pushed the result.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]