diff --git a/.travis.yml b/.travis.yml index ea5e0ac593187..ca77ad29351e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -207,6 +207,8 @@ matrix: stage: tier2 - env: TARGET=x86_64-unknown-linux-musl stage: tier2 + - env: TARGET=x86_64-unknown-redox + stage: tier2 - env: TARGET=wasm32-wasi rust: nightly stage: tier2 diff --git a/Cargo.toml b/Cargo.toml index a881faef45390..120fbe19c662d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libc" -version = "0.2.58" +version = "0.2.59" authors = ["The Rust Project Developers"] license = "MIT OR Apache-2.0" readme = "README.md" diff --git a/ci/docker/x86_64-unknown-redox/Dockerfile b/ci/docker/x86_64-unknown-redox/Dockerfile new file mode 100644 index 0000000000000..91b0cbabdc0b6 --- /dev/null +++ b/ci/docker/x86_64-unknown-redox/Dockerfile @@ -0,0 +1,9 @@ +FROM redoxos/redoxer + +RUN mv /root/.redoxer /.redoxer + +ENV PATH=$PATH:/.redoxer/toolchain/bin:/rust/bin \ + AR_x86_64_unknown_redox="x86_64-unknown-redox-ar" \ + CC_x86_64_unknown_redox="x86_64-unknown-redox-gcc" \ + CARGO_TARGET_X86_64_UNKNOWN_REDOX_LINKER="x86_64-unknown-redox-gcc" \ + CARGO_TARGET_X86_64_UNKNOWN_REDOX_RUNNER="redoxer exec --folder ." diff --git a/libc-test/build.rs b/libc-test/build.rs index 06386f81d2661..9771773688fb8 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -478,45 +478,44 @@ fn test_redox(target: &str) { headers! { cfg: + "arpa/inet.h", "ctype.h", "dirent.h", "dlfcn.h", "errno.h", - "execinfo.h", "fcntl.h", - "glob.h", "grp.h", - "ifaddrs.h", - "langinfo.h", "limits.h", "locale.h", - "net/if.h", - "net/if_arp.h", - "net/route.h", + "malloc.h", "netdb.h", "netinet/in.h", "netinet/ip.h", "netinet/tcp.h", - "netinet/udp.h", "poll.h", "pthread.h", "pwd.h", - "resolv.h", + "regex.h", "sched.h", "semaphore.h", + "signal.h", + "stdarg.h", + "stdbool.h", + "stddef.h", + "stdint.h", + "stdio.h", + "stdlib.h", "string.h", "strings.h", + "sys/epoll.h", "sys/file.h", "sys/ioctl.h", "sys/mman.h", - "sys/mount.h", - "sys/ptrace.h", - "sys/quota.h", "sys/resource.h", + "sys/select.h", "sys/socket.h", "sys/stat.h", "sys/statvfs.h", - "sys/sysctl.h", "sys/time.h", "sys/times.h", "sys/types.h", @@ -524,12 +523,10 @@ fn test_redox(target: &str) { "sys/un.h", "sys/utsname.h", "sys/wait.h", - "syslog.h", "termios.h", "time.h", "unistd.h", "utime.h", - "utmpx.h", "wchar.h", } diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 388918eb9b5dc..532bd60863dd6 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -36,6 +36,13 @@ pub type suseconds_t = ::c_int; pub type tcflag_t = u32; pub type time_t = ::c_long; +#[cfg_attr(feature = "extra_traits", derive(Debug))] +pub enum timezone {} +impl ::Copy for timezone {} +impl ::Clone for timezone { + fn clone(&self) -> timezone { *self } +} + s! { pub struct addrinfo { pub ai_flags: ::c_int,