diff options
author | Alex Crichton <alex@alexcrichton.com> | 2018-07-31 14:13:30 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2018-08-01 07:49:22 -0700 |
commit | 83f78df8c6f1e7309ed9bcb4bf1168b0bc7d2295 (patch) | |
tree | b97166858aee03c1ce04f20340cf3083d0f73b4b /libc-test | |
parent | e1ebfafc2f011216287c61ce8ff492f57dddee36 (diff) | |
download | rust-libc-83f78df8c6f1e7309ed9bcb4bf1168b0bc7d2295.tar.gz |
Fix OSX builders on CI
Looks like Travis has moved on from our old images, so we're forced to
update.
Diffstat (limited to 'libc-test')
-rw-r--r-- | libc-test/build.rs | 67 |
1 files changed, 56 insertions, 11 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 6c2ac5496e..d46372b44b 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -15,6 +15,7 @@ fn main() { let linux = target.contains("unknown-linux"); let android = target.contains("android"); let apple = target.contains("apple"); + let ios = target.contains("apple-ios"); let emscripten = target.contains("asm"); let musl = target.contains("musl") || emscripten; let uclibc = target.contains("uclibc"); @@ -84,8 +85,10 @@ fn main() { cfg.header("sys/socket.h"); } cfg.header("net/if.h"); - cfg.header("net/route.h"); - cfg.header("net/if_arp.h"); + if !ios { + cfg.header("net/route.h"); + cfg.header("net/if_arp.h"); + } cfg.header("netdb.h"); cfg.header("netinet/in.h"); cfg.header("netinet/ip.h"); @@ -113,7 +116,7 @@ fn main() { cfg.header("pwd.h"); cfg.header("grp.h"); cfg.header("sys/utsname.h"); - if !solaris { + if !solaris && !ios { cfg.header("sys/ptrace.h"); } cfg.header("sys/mount.h"); @@ -175,19 +178,22 @@ fn main() { cfg.header("util.h"); cfg.header("xlocale.h"); cfg.header("sys/xattr.h"); - cfg.header("sys/sys_domain.h"); - cfg.header("net/if_utun.h"); - cfg.header("net/bpf.h"); - if target.starts_with("x86") { + if target.starts_with("x86") && !ios { cfg.header("crt_externs.h"); } - cfg.header("net/route.h"); - cfg.header("netinet/if_ether.h"); cfg.header("netinet/in.h"); - cfg.header("sys/proc_info.h"); - cfg.header("sys/kern_control.h"); cfg.header("sys/ipc.h"); cfg.header("sys/shm.h"); + + if !ios { + cfg.header("sys/sys_domain.h"); + cfg.header("net/if_utun.h"); + cfg.header("net/bpf.h"); + cfg.header("net/route.h"); + cfg.header("netinet/if_ether.h"); + cfg.header("sys/proc_info.h"); + cfg.header("sys/kern_control.h"); + } } if bsdlike { @@ -449,6 +455,17 @@ fn main() { // header conflicts when including them with all the other structs. "termios2" => true, + // Present on historical versions of iOS but missing in more recent + // SDKs + "bpf_hdr" | + "proc_taskinfo" | + "proc_taskallinfo" | + "proc_bsdinfo" | + "proc_threadinfo" | + "sockaddr_inarp" | + "sockaddr_ctl" | + "arphdr" if ios => true, + _ => false } }); @@ -594,6 +611,30 @@ fn main() { // shouldn't be used in code anyway... "AF_MAX" | "PF_MAX" => true, + // Present on historical versions of iOS, but now removed in more + // recent SDKs + "ARPOP_REQUEST" | + "ARPOP_REPLY" | + "ATF_COM" | + "ATF_PERM" | + "ATF_PUBL" | + "ATF_USETRAILERS" | + "AF_SYS_CONTROL" | + "SYSPROTO_EVENT" | + "PROC_PIDTASKALLINFO" | + "PROC_PIDTASKINFO" | + "PROC_PIDTHREADINFO" | + "UTUN_OPT_FLAGS" | + "UTUN_OPT_IFNAME" | + "BPF_ALIGNMENT" | + "SYSPROTO_CONTROL" if ios => true, + s if ios && s.starts_with("RTF_") => true, + s if ios && s.starts_with("RTM_") => true, + s if ios && s.starts_with("RTA_") => true, + s if ios && s.starts_with("RTAX_") => true, + s if ios && s.starts_with("RTV_") => true, + s if ios && s.starts_with("DLT_") => true, + _ => false, } }); @@ -736,6 +777,10 @@ fn main() { // FIXME: mincore is defined with caddr_t on Solaris. "mincore" if solaris => true, + // These were all included in historical versions of iOS but appear + // to be removed now + "system" | "ptrace" if ios => true, + _ => false, } }); |