From d8a58488bd56ef9c09e167173124c3519bc7405d Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 15 Jan 2018 09:30:24 -0800 Subject: Update libc crate to 0.2.36 Import subrepo libc/:libc at 16a0f4a3d6c836f88f50c58f5d0a74a32cbf0193 --- libc/src/unix/newlib/mod.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'libc/src/unix/newlib/mod.rs') diff --git a/libc/src/unix/newlib/mod.rs b/libc/src/unix/newlib/mod.rs index aec3bca..6cf8633 100644 --- a/libc/src/unix/newlib/mod.rs +++ b/libc/src/unix/newlib/mod.rs @@ -435,6 +435,15 @@ pub const O_NONBLOCK: ::c_int = 16384; pub const O_ACCMODE: ::c_int = 3; pub const O_CLOEXEC: ::c_int = 0x80000; +pub const POLLIN: ::c_short = 0x1; +pub const POLLPRI: ::c_short = 0x2; +pub const POLLOUT: ::c_short = 0x4; +pub const POLLERR: ::c_short = 0x8; +pub const POLLHUP: ::c_short = 0x10; +pub const POLLNVAL: ::c_short = 0x20; + +pub const RTLD_LAZY: ::c_int = 0x1; + pub const STDIN_FILENO: ::c_int = 0; pub const STDOUT_FILENO: ::c_int = 1; pub const STDERR_FILENO: ::c_int = 2; @@ -508,6 +517,26 @@ pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; pub const INET_ADDRSTRLEN: ::c_int = 16; +// https://github. +// com/bminor/newlib/blob/master/newlib/libc/sys/linux/include/net/if.h#L121 +pub const IFF_UP: ::c_int = 0x1; // interface is up +pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid +pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging +pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net +pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link +pub const IFF_NOTRAILERS: ::c_int = 0x20; // avoid use of trailers +pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated +pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol +pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets +pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets +pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress +pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions +pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit +pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit +pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit +pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection +pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast + pub const IPPROTO_IP: ::c_int = 0; pub const IPPROTO_UDP: ::c_int = 17; pub const IPPROTO_TCP: ::c_int = 6; @@ -650,6 +679,9 @@ cfg_if! { if #[cfg(target_arch = "arm")] { mod arm; pub use self::arm::*; + } else if #[cfg(target_arch = "aarch64")] { + mod aarch64; + pub use self::aarch64::*; } else { // Only tested on ARM so far. Other platforms might have different // definitions for types and constants. -- cgit v1.2.1