Skip to content

Commit 7775ce2

Browse files
committed
change getnameinfo flags type to int to conform to other libc implementations
1 parent 10c5418 commit 7775ce2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

libc-test/build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2725,6 +2725,10 @@ fn test_linux(target: &str) {
27252725
"posix_spawn_file_actions_init" if uclibc => true,
27262726
"posix_spawn_file_actions_destroy" if uclibc => true,
27272727

2728+
// uclibc defines the flags type as a uint, but dependent crates
2729+
// assume it's a int instead.
2730+
"getnameinfo" if uclibc => true,
2731+
27282732
_ => false,
27292733
}
27302734
});

src/unix/linux_like/linux/uclibc/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ extern "C" {
271271
hostlen: ::socklen_t,
272272
serv: *mut ::c_char,
273273
sevlen: ::socklen_t,
274-
flags: ::c_uint,
274+
flags: ::c_int,
275275
) -> ::c_int;
276276

277277
pub fn pwritev(

0 commit comments

Comments
 (0)