From be7e45f6f5f4fb372ebe8dfab7533500cf3e254c Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Wed, 3 May 2017 15:57:29 -0400 Subject: [PATCH] Skip res_init test on macOS/iOS --- libc-test/build.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 57767f55ea5a3..2f59a442af184 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -469,10 +469,16 @@ fn main() { // it's in a header file? "endpwent" if android => true, - // Apparently it exists, but isn't defined in a header: + // Apparently res_init exists on Android, but isn't defined in a header: // https://mail.gnome.org/archives/commits-list/2013-May/msg01329.html "res_init" if android => true, + // On macOS and iOS, res_init is available, but requires linking with libresolv: + // http://blog.achernya.com/2013/03/os-x-has-silly-libsystem.html + // See discussion for skipping here: + // https://github.com/rust-lang/libc/pull/585#discussion_r114561460 + "res_init" if apple => true, + _ => false, } });