Skip to content

Commit 84c12a4

Browse files
committed
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` ```
2 parents 5598401 + 2e14399 commit 84c12a4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/unix/uclibc/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ pub const EAI_BADFLAGS: ::c_int = -1;
13651365
pub const EAI_NONAME: ::c_int = -2;
13661366
pub const EAI_AGAIN: ::c_int = -3;
13671367
pub const EAI_FAIL: ::c_int = -4;
1368+
pub const EAI_NODATA: ::c_int = -5;
13681369
pub const EAI_FAMILY: ::c_int = -6;
13691370
pub const EAI_SOCKTYPE: ::c_int = -7;
13701371
pub const EAI_SERVICE: ::c_int = -8;
@@ -2318,6 +2319,15 @@ extern "C" {
23182319
pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
23192320
pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE;
23202321
pub fn uname(buf: *mut ::utsname) -> ::c_int;
2322+
pub fn getnameinfo(
2323+
sa: *const ::sockaddr,
2324+
salen: ::socklen_t,
2325+
host: *mut ::c_char,
2326+
hostlen: ::socklen_t,
2327+
serv: *mut ::c_char,
2328+
sevlen: ::socklen_t,
2329+
flags: ::c_uint,
2330+
) -> ::c_int;
23212331
}
23222332

23232333
cfg_if! {

0 commit comments

Comments
 (0)