diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-01-23 21:01:30 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-01-23 21:01:30 -0800 |
commit | aa4e1b586c8acc1eee1163a6d8de36bab7ececaf (patch) | |
tree | 7eb46e111691e8614b52121c711c40c8a650b77f | |
parent | 33bfefe027b7ccc67225428cfd8203dc380515f4 (diff) | |
parent | 842ff2f5b451de659ef7ee8eba2b9e22994f174e (diff) | |
download | rust-libc-aa4e1b586c8acc1eee1163a6d8de36bab7ececaf.tar.gz |
Merge pull request #150 from jamperry/master
Add SOCK_NONBLOCK & SOCK_CLOEXEC
-rw-r--r-- | src/unix/notbsd/linux/mips.rs | 2 | ||||
-rw-r--r-- | src/unix/notbsd/linux/musl.rs | 2 | ||||
-rw-r--r-- | src/unix/notbsd/linux/other/mod.rs | 2 | ||||
-rw-r--r-- | src/unix/notbsd/mod.rs | 3 |
4 files changed, 9 insertions, 0 deletions
diff --git a/src/unix/notbsd/linux/mips.rs b/src/unix/notbsd/linux/mips.rs index ebf2d230f7..00a2235b93 100644 --- a/src/unix/notbsd/linux/mips.rs +++ b/src/unix/notbsd/linux/mips.rs @@ -205,6 +205,8 @@ pub const O_FSYNC: ::c_int = 0x4010; pub const O_ASYNC: ::c_int = 0x1000; pub const O_NDELAY: ::c_int = 0x80; +pub const SOCK_NONBLOCK: ::c_int = 128; + pub const EDEADLK: ::c_int = 45; pub const ENAMETOOLONG: ::c_int = 78; pub const ENOLCK: ::c_int = 46; diff --git a/src/unix/notbsd/linux/musl.rs b/src/unix/notbsd/linux/musl.rs index 3c1d7b6d23..30a7f402e5 100644 --- a/src/unix/notbsd/linux/musl.rs +++ b/src/unix/notbsd/linux/musl.rs @@ -190,6 +190,8 @@ pub const O_SYNC: ::c_int = 1052672; pub const O_RSYNC: ::c_int = 1052672; pub const O_DSYNC: ::c_int = 4096; +pub const SOCK_NONBLOCK: ::c_int = 2048; + pub const MAP_ANON: ::c_int = 0x0020; pub const MAP_ANONYMOUS: ::c_int = 0x0020; pub const MAP_GROWSDOWN: ::c_int = 0x0100; diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index b3df212a94..5ae7050199 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -105,6 +105,8 @@ pub const O_RSYNC: ::c_int = 1052672; pub const O_DSYNC: ::c_int = 4096; pub const O_FSYNC: ::c_int = 0x101000; +pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; + pub const MAP_ANON: ::c_int = 0x0020; pub const MAP_ANONYMOUS: ::c_int = 0x0020; pub const MAP_GROWSDOWN: ::c_int = 0x0100; diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index 0472c06b3a..6c93a0ddcf 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -174,6 +174,9 @@ pub const O_WRONLY: ::c_int = 1; pub const O_RDWR: ::c_int = 2; pub const O_TRUNC: ::c_int = 512; pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; + pub const S_IFIFO: ::mode_t = 4096; pub const S_IFCHR: ::mode_t = 8192; pub const S_IFBLK: ::mode_t = 24576; |