From: Dr. Michael Lauer Date: Tue, 16 Jan 2018 15:50:26 +0000 (+0100) Subject: posix: fix binding of struct hostent. Make clear that gethostbyname(3) can return... X-Git-Tag: 0.34.14~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd1a4f62cbea19e44f2e6abed48eac5d68f786f6;p=thirdparty%2Fvala.git posix: fix binding of struct hostent. Make clear that gethostbyname(3) can return NULL. --- diff --git a/vapi/posix.vapi b/vapi/posix.vapi index 34721128e..5afddbfe7 100644 --- a/vapi/posix.vapi +++ b/vapi/posix.vapi @@ -1482,7 +1482,7 @@ namespace Posix { [CCode (cheader_filename = "netdb.h")] public unowned string gai_strerror (int errcode); [CCode (cheader_filename = "netdb.h")] - public unowned HostEnt gethostbyname (string name); + public unowned HostEnt? gethostbyname (string name); [CCode (cname = "socklen_t", cheader_filename = "sys/socket.h", default_value = "0", has_type_id = false)] public struct socklen_t : int { @@ -1534,6 +1534,7 @@ namespace Posix { public AddrInfo *ai_next; } + [Compact] [CCode (cname = "struct hostent", cheader_filename = "netdb.h", destroy_function = "", has_type_id = false)] public class HostEnt { public string h_name;