]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: fix binding of struct hostent. Make clear that gethostbyname(3) can return...
authorDr. Michael Lauer <mickey@vanille-media.de>
Tue, 16 Jan 2018 15:50:26 +0000 (16:50 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 21 Jan 2018 16:15:52 +0000 (17:15 +0100)
vapi/posix.vapi

index 34721128e0257d9389080cadee6190f54e68bd70..5afddbfe7f0804470dde5c64bf87ea9d9d12574b 100644 (file)
@@ -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;