bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] [PATCH]: getaddrinfo module broken


From: Yoann Vandoorselaere
Subject: [bug-gnulib] [PATCH]: getaddrinfo module broken
Date: Tue, 10 May 2005 00:44:28 +0200

Hi,

Here is a patch that address several issues in the getaddrinfo GnuLib
module implementation:

- getaddrinfo might be available from -lnls or -lsocket. Look that up.

- Don't fail when SOCK_STREAM or SOCK_DGRAM are specified in ai_socktype
(most getaddrinfo usage involve using it, this was making the module
unusable).

- Fix invalid ai_protocol check. ai_protocol is usually set to 0 or
depending on ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP. 
Checking for SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.

- Set ai_socktype / ai_protocol in the returned addrinfo structure.


I'm using this patch in Prelude for a while and it definitely fixed most
of the bug experienced by people lacking a getaddrinfo() implementation.

Regards,

-- 
Yoann Vandoorselaere <address@hidden>

Attachment: gnulib-getaddrinfo.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]