浏览代码

Add netdb bits to include hostent.h_addr

Jeremy Soller 6 年之前
父节点
当前提交
c6f2b30738
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 6 0
      include/bits/netdb.h
  2. 1 0
      src/header/netdb/cbindgen.toml

+ 6 - 0
include/bits/netdb.h

@@ -0,0 +1,6 @@
+#ifndef _BITS_NETDB_H
+#define _BITS_NETDB_H
+
+# define        h_addr  h_addr_list[0] /* Address, for backward compatibility.*/
+
+#endif /* _BITS_NETDB_H */

+ 1 - 0
src/header/netdb/cbindgen.toml

@@ -1,5 +1,6 @@
 sys_includes = ["sys/socket.h", "netinet/in.h"]
 include_guard = "_NETDB_H"
+trailer = "#include <bits/netdb.h>"
 language = "C"
 style = "Tag"