diff options
author | bors <bors@rust-lang.org> | 2020-11-25 02:51:32 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2020-11-25 02:51:32 +0000 |
commit | 84c12a458aecc54781687e1f3d06c62802d28476 (patch) | |
tree | 679066a1a52815972318139b2cc905da468c770d | |
parent | 5598401c182fc0289bc0f386651944624cb15581 (diff) | |
parent | 2e143993445db473d2ae73956faee829f73be010 (diff) | |
download | rust-libc-84c12a458aecc54781687e1f3d06c62802d28476.tar.gz |
Auto merge of #1979 - kolapapa:uclibc-dnslookup, r=JohnTitor
add `getnameinfo` && `EAI_NODATA` in uclibc
when compiling `dns-lookup v1.0.5` in target `mipsel-unknown-linux-uclibc`
```shell
error[E0432]: unresolved import `libc::getnameinfo`
error[E0531]: cannot find unit struct, unit variant or constant `EAI_NODATA` in crate `c`
```
-rw-r--r-- | src/unix/uclibc/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/unix/uclibc/mod.rs b/src/unix/uclibc/mod.rs index f0026bf86a..c72d321bc7 100644 --- a/src/unix/uclibc/mod.rs +++ b/src/unix/uclibc/mod.rs @@ -1365,6 +1365,7 @@ pub const EAI_BADFLAGS: ::c_int = -1; pub const EAI_NONAME: ::c_int = -2; pub const EAI_AGAIN: ::c_int = -3; pub const EAI_FAIL: ::c_int = -4; +pub const EAI_NODATA: ::c_int = -5; pub const EAI_FAMILY: ::c_int = -6; pub const EAI_SOCKTYPE: ::c_int = -7; pub const EAI_SERVICE: ::c_int = -8; @@ -2318,6 +2319,15 @@ extern "C" { pub fn getgrgid(gid: ::gid_t) -> *mut ::group; pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; pub fn uname(buf: *mut ::utsname) -> ::c_int; + pub fn getnameinfo( + sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::socklen_t, + serv: *mut ::c_char, + sevlen: ::socklen_t, + flags: ::c_uint, + ) -> ::c_int; } cfg_if! { |