diff options
author | Dr. Michael Lauer <mickey@vanille-media.de> | 2018-01-16 16:50:26 +0100 |
---|---|---|
committer | Dr. Michael Lauer <mickey@vanille-media.de> | 2018-01-20 14:54:18 +0100 |
commit | 43df5fb299919d5db7ae590683c5a58c3105f37d (patch) | |
tree | 407bdce3d0f4c1a3b51ac143de234ada7f453fe3 | |
parent | 272b41781d028ecd8e6b90bcb7eb2f6aa4b0f512 (diff) | |
download | vala-43df5fb299919d5db7ae590683c5a58c3105f37d.tar.gz |
posix: fix binding of struct hostent. Make clear that gethostbyname(3) can return NULL.
-rw-r--r-- | vapi/posix.vapi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vapi/posix.vapi b/vapi/posix.vapi index 51400545d..93e043c8e 100644 --- a/vapi/posix.vapi +++ b/vapi/posix.vapi @@ -1668,7 +1668,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 { @@ -1720,6 +1720,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; |