Merge pull request #46 from alexcrichton/ni-maxhost

Add NI_MAXHOST
This commit is contained in:
Alex Crichton 2015-11-07 15:50:52 -08:00
commit c821847109
7 changed files with 18 additions and 13 deletions

View File

@ -54,7 +54,7 @@ case "$TARGET" in
cp -r /checkout/* .
mkdir .cargo
cp ci/cargo-config .cargo/config
sh ci/run.sh $TARGET
exec sh ci/run.sh $TARGET
"
exec docker run \
--entrypoint bash \

View File

@ -22,7 +22,8 @@ case "$TARGET" in
emulator @arm-18 -no-window &
adb wait-for-device
adb push libc-test/target/$TARGET/debug/libc-test /data/libc-test
adb shell /data/libc-test
adb shell /data/libc-test 2>&1 | tee out
grep "^PASSED .* tests" out
;;
arm-unknown-linux-gnueabihf)

View File

@ -107,6 +107,8 @@ pub const FD_SETSIZE: usize = 1024;
pub const ST_RDONLY: ::c_ulong = 1;
pub const ST_NOSUID: ::c_ulong = 2;
pub const NI_MAXHOST: ::socklen_t = 1025;
f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let fd = fd as usize;

View File

@ -317,6 +317,7 @@ pub const O_NOCTTY: ::c_int = 256;
pub const O_NONBLOCK: ::c_int = 2048;
pub const O_SYNC: ::c_int = 0x1000;
pub const NI_MAXHOST: ::size_t = 1025;
f! {
pub fn sigemptyset(set: *mut sigset_t) -> ::c_int {

View File

@ -320,17 +320,6 @@ extern {
count: ::size_t) -> ::ssize_t;
}
cfg_if! {
if #[cfg(any(target_env = "musl"))] {
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
} else if #[cfg(any(target_arch = "arm", target_arch = "x86",
target_arch = "x86_64"))] {
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
} else {
pub const PTHREAD_STACK_MIN: ::size_t = 131072;
}
}
cfg_if! {
if #[cfg(target_env = "musl")] {
mod musl;

View File

@ -4,6 +4,8 @@ pub const FOPEN_MAX: ::c_uint = 1000;
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
pub const O_ACCMODE: ::c_int = 0o10000003;
pub const RUSAGE_CHILDREN: ::c_int = 1;
pub const NI_MAXHOST: ::socklen_t = 255;
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
extern {
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;

View File

@ -22,6 +22,16 @@ pub const RUSAGE_THREAD: ::c_int = 1;
pub const O_ACCMODE: ::c_int = 3;
pub const RUSAGE_CHILDREN: ::c_int = -1;
pub const ST_RELATIME: ::c_ulong = 4096;
pub const NI_MAXHOST: ::socklen_t = 1025;
cfg_if! {
if #[cfg(any(target_arch = "arm", target_arch = "x86",
target_arch = "x86_64"))] {
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
} else {
pub const PTHREAD_STACK_MIN: ::size_t = 131072;
}
}
extern {
pub fn sysctl(name: *mut ::c_int,