Merge pull request #88 from alexcrichton/update-android
Update the android CI image
This commit is contained in:
commit
4b9b07c719
@ -25,7 +25,7 @@ env:
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: TARGET=arm-linux-androideabi DOCKER=alexcrichton/rust-slave-android:2015-10-21
|
||||
env: TARGET=arm-linux-androideabi DOCKER=alexcrichton/rust-slave-android:2015-11-22
|
||||
rust: nightly
|
||||
- os: linux
|
||||
env: TARGET=x86_64-unknown-linux-musl
|
||||
|
@ -19,7 +19,7 @@ esac
|
||||
|
||||
case "$TARGET" in
|
||||
arm-linux-androideabi)
|
||||
emulator @arm-18 -no-window &
|
||||
emulator @arm-21 -no-window &
|
||||
adb wait-for-device
|
||||
adb push /tmp/$TARGET/debug/libc-test /data/libc-test
|
||||
adb shell /data/libc-test 2>&1 | tee /tmp/out
|
||||
|
@ -138,6 +138,7 @@ fn main() {
|
||||
cfg.header("sys/eventfd.h");
|
||||
cfg.header("sys/prctl.h");
|
||||
cfg.header("sys/vfs.h");
|
||||
cfg.header("sys/syscall.h");
|
||||
if !musl {
|
||||
cfg.header("linux/netlink.h");
|
||||
cfg.header("linux/magic.h");
|
||||
@ -304,6 +305,9 @@ fn main() {
|
||||
// typed 2nd arg on linux and android
|
||||
"gettimeofday" if linux || android || freebsd => true,
|
||||
|
||||
// not declared in newer android toolchains
|
||||
"getdtablesize" if android => true,
|
||||
|
||||
"dlerror" if android => true, // const-ness is added
|
||||
"dladdr" if musl => true, // const-ness only added recently
|
||||
|
||||
@ -333,8 +337,20 @@ fn main() {
|
||||
}
|
||||
});
|
||||
|
||||
// Windows dllimport oddness?
|
||||
cfg.skip_fn_ptrcheck(move |_| windows);
|
||||
cfg.skip_fn_ptrcheck(move |name| {
|
||||
match name {
|
||||
// This used to be called bsd_signal in rev 18 of the android
|
||||
// platform and is now just called signal, the old `bsd_signal`
|
||||
// symbol, however, still remains, just gives a different function
|
||||
// pointer.
|
||||
"signal" if android => true,
|
||||
|
||||
// dllimport weirdness?
|
||||
_ if windows => true,
|
||||
|
||||
_ => false,
|
||||
}
|
||||
});
|
||||
|
||||
cfg.skip_field_type(move |struct_, field| {
|
||||
// This is a weird union, don't check the type.
|
||||
@ -352,7 +368,7 @@ fn main() {
|
||||
});
|
||||
|
||||
cfg.fn_cname(move |name, cname| {
|
||||
if windows || android {
|
||||
if windows {
|
||||
cname.unwrap_or(name).to_string()
|
||||
} else {
|
||||
name.to_string()
|
||||
|
@ -524,6 +524,27 @@ extern {
|
||||
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
|
||||
pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
|
||||
pub fn chroot(name: *const ::c_char) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "usleep$UNIX2003")]
|
||||
pub fn usleep(secs: ::c_uint) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "send$UNIX2003")]
|
||||
pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
|
||||
flags: ::c_int) -> ::ssize_t;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "recv$UNIX2003")]
|
||||
pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
|
||||
flags: ::c_int) -> ::ssize_t;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "putenv$UNIX2003")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__putenv50")]
|
||||
pub fn putenv(string: *mut c_char) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "sendmsg$UNIX2003")]
|
||||
pub fn sendmsg(fd: ::c_int, msg: *const msghdr, flags: ::c_int) -> ::ssize_t;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "recvmsg$UNIX2003")]
|
||||
pub fn recvmsg(fd: ::c_int, msg: *mut msghdr, flags: ::c_int) -> ::ssize_t;
|
||||
}
|
||||
|
||||
// TODO: get rid of this #[cfg(not(...))]
|
||||
@ -561,10 +582,6 @@ extern {
|
||||
pub fn getsid(pid: pid_t) -> pid_t;
|
||||
pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
|
||||
-> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "putenv$UNIX2003")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__putenv50")]
|
||||
pub fn putenv(string: *mut c_char) -> ::c_int;
|
||||
pub fn readlink(path: *const c_char,
|
||||
buf: *mut c_char,
|
||||
bufsz: ::size_t)
|
||||
@ -575,22 +592,11 @@ extern {
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__msync13")]
|
||||
pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
|
||||
pub fn sysconf(name: ::c_int) -> c_long;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "usleep$UNIX2003")]
|
||||
pub fn usleep(secs: ::c_uint) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "recvfrom$UNIX2003")]
|
||||
pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
|
||||
flags: ::c_int, addr: *mut sockaddr,
|
||||
addrlen: *mut socklen_t) -> ::ssize_t;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "send$UNIX2003")]
|
||||
pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
|
||||
flags: ::c_int) -> ::ssize_t;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "recv$UNIX2003")]
|
||||
pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
|
||||
flags: ::c_int) -> ::ssize_t;
|
||||
pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int;
|
||||
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
|
||||
@ -641,12 +647,6 @@ extern {
|
||||
pub fn timegm(tm: *mut ::tm) -> time_t;
|
||||
pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int;
|
||||
pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "sendmsg$UNIX2003")]
|
||||
pub fn sendmsg(fd: ::c_int, msg: *const msghdr, flags: ::c_int) -> ::ssize_t;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "recvmsg$UNIX2003")]
|
||||
pub fn recvmsg(fd: ::c_int, msg: *mut msghdr, flags: ::c_int) -> ::ssize_t;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "tcdrain$UNIX2003")]
|
||||
pub fn tcdrain(fd: ::c_int) -> ::c_int;
|
||||
|
@ -13,8 +13,8 @@ pub type blkcnt_t = u32;
|
||||
pub type blksize_t = u32;
|
||||
pub type dev_t = u32;
|
||||
pub type mode_t = u16;
|
||||
pub type nlink_t = u16;
|
||||
pub type useconds_t = i32;
|
||||
pub type nlink_t = u32;
|
||||
pub type useconds_t = u32;
|
||||
pub type socklen_t = i32;
|
||||
pub type pthread_t = c_long;
|
||||
pub type pthread_mutexattr_t = ::c_long;
|
||||
@ -30,8 +30,8 @@ s! {
|
||||
__st_ino: ::ino_t,
|
||||
pub st_mode: ::c_uint,
|
||||
pub st_nlink: ::c_uint,
|
||||
pub st_uid: ::c_ulong,
|
||||
pub st_gid: ::c_ulong,
|
||||
pub st_uid: ::uid_t,
|
||||
pub st_gid: ::gid_t,
|
||||
pub st_rdev: ::c_ulonglong,
|
||||
__pad3: [::c_uchar; 4],
|
||||
pub st_size: ::c_longlong,
|
||||
@ -125,7 +125,7 @@ s! {
|
||||
pub msg_iovlen: ::size_t,
|
||||
pub msg_control: *mut ::c_void,
|
||||
pub msg_controllen: ::size_t,
|
||||
pub msg_flags: ::c_uint,
|
||||
pub msg_flags: ::c_int,
|
||||
}
|
||||
|
||||
pub struct termios {
|
||||
@ -385,7 +385,7 @@ pub const O_CREAT: ::c_int = 64;
|
||||
pub const O_EXCL: ::c_int = 128;
|
||||
pub const O_NOCTTY: ::c_int = 256;
|
||||
pub const O_NONBLOCK: ::c_int = 2048;
|
||||
pub const O_SYNC: ::c_int = 0x1000;
|
||||
pub const O_SYNC: ::c_int = 0x101000;
|
||||
pub const O_DIRECT: ::c_int = 0x10000;
|
||||
pub const O_DIRECTORY: ::c_int = 0x4000;
|
||||
pub const O_NOFOLLOW: ::c_int = 0x8000;
|
||||
@ -399,9 +399,9 @@ pub const TCXONC: ::c_int = 0x540A;
|
||||
pub const TCFLSH: ::c_int = 0x540B;
|
||||
pub const TCSBRKP: ::c_int = 0x5425;
|
||||
pub const TCGETS: ::c_int = 0x5401;
|
||||
pub const TCSANOW: ::c_int = 0x5402;
|
||||
pub const TCSADRAIN: ::c_int = 0x5403;
|
||||
pub const TCSAFLUSH: ::c_int = 0x5404;
|
||||
pub const TCSANOW: ::c_int = 0;
|
||||
pub const TCSADRAIN: ::c_int = 0x1;
|
||||
pub const TCSAFLUSH: ::c_int = 0x2;
|
||||
pub const IUTF8: ::tcflag_t = 0x00004000;
|
||||
pub const VEOF: usize = 4;
|
||||
pub const VEOL: usize = 11;
|
||||
@ -411,7 +411,7 @@ pub const IEXTEN: ::tcflag_t = 0x00008000;
|
||||
pub const TOSTOP: ::tcflag_t = 0x00000100;
|
||||
pub const FLUSHO: ::tcflag_t = 0x00001000;
|
||||
|
||||
pub const MS_RMT_MASK: ::c_ulong = 0x51;
|
||||
pub const MS_RMT_MASK: ::c_ulong = 0x800051;
|
||||
pub const MS_VERBOSE: ::c_ulong = 0x8000;
|
||||
|
||||
pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
|
||||
@ -530,7 +530,6 @@ extern {
|
||||
pub fn madvise(addr: *const ::c_void, len: ::size_t, advice: ::c_int)
|
||||
-> ::c_int;
|
||||
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
|
||||
pub fn putenv(string: *const ::c_char) -> ::c_int;
|
||||
pub fn readlink(path: *const ::c_char,
|
||||
buf: *mut ::c_char,
|
||||
bufsz: ::size_t)
|
||||
@ -540,14 +539,9 @@ extern {
|
||||
pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
|
||||
-> ::c_int;
|
||||
pub fn sysconf(name: ::c_int) -> ::c_long;
|
||||
pub fn usleep(secs: ::c_ulong) -> ::c_int;
|
||||
pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
|
||||
flags: ::c_uint, addr: *const ::sockaddr,
|
||||
flags: ::c_int, addr: *const ::sockaddr,
|
||||
addrlen: *mut ::socklen_t) -> ::ssize_t;
|
||||
pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
|
||||
flags: ::c_uint) -> ::ssize_t;
|
||||
pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
|
||||
flags: ::c_uint) -> ::ssize_t;
|
||||
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||
salen: ::socklen_t,
|
||||
host: *mut ::c_char,
|
||||
@ -556,11 +550,8 @@ extern {
|
||||
sevlen: ::size_t,
|
||||
flags: ::c_int) -> ::c_int;
|
||||
pub fn timegm64(tm: *const ::tm) -> time64_t;
|
||||
pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_uint) -> ::c_int;
|
||||
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_uint) -> ::c_int;
|
||||
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
|
||||
pub fn ptrace(request: ::c_int, ...) -> ::c_long;
|
||||
pub fn syscall(num: ::c_int, ...) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
@ -13,6 +13,7 @@ pub type fsblkcnt_t = ::c_ulong;
|
||||
pub type fsfilcnt_t = ::c_ulong;
|
||||
pub type key_t = ::c_int;
|
||||
pub type shmatt_t = ::c_ulong;
|
||||
pub type mqd_t = ::c_int;
|
||||
|
||||
pub enum fpos64_t {} // TODO: fill this out with a struct
|
||||
|
||||
@ -506,7 +507,6 @@ extern {
|
||||
sigmask: *const ::sigset_t) -> ::c_int;
|
||||
pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
|
||||
pub fn unshare(flags: ::c_int) -> ::c_int;
|
||||
pub fn syscall(num: ::c_long, ...) -> ::c_long;
|
||||
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ use dox::mem;
|
||||
pub type rlim_t = c_ulong;
|
||||
pub type sa_family_t = u16;
|
||||
pub type pthread_key_t = ::c_uint;
|
||||
pub type mqd_t = ::c_int;
|
||||
pub type speed_t = ::c_uint;
|
||||
pub type tcflag_t = ::c_uint;
|
||||
|
||||
@ -607,6 +606,7 @@ extern {
|
||||
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
|
||||
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
|
||||
pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
|
||||
pub fn syscall(num: ::c_long, ...) -> ::c_long;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
Loading…
Reference in New Issue
Block a user