Skip to content

Commit aa4e1b5

Browse files
committed
Merge pull request rust-lang#150 from jamperry/master
Add SOCK_NONBLOCK & SOCK_CLOEXEC
2 parents 33bfefe + 842ff2f commit aa4e1b5

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

src/unix/notbsd/linux/mips.rs

+2
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ pub const O_FSYNC: ::c_int = 0x4010;
205205
pub const O_ASYNC: ::c_int = 0x1000;
206206
pub const O_NDELAY: ::c_int = 0x80;
207207

208+
pub const SOCK_NONBLOCK: ::c_int = 128;
209+
208210
pub const EDEADLK: ::c_int = 45;
209211
pub const ENAMETOOLONG: ::c_int = 78;
210212
pub const ENOLCK: ::c_int = 46;

src/unix/notbsd/linux/musl.rs

+2
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ pub const O_SYNC: ::c_int = 1052672;
190190
pub const O_RSYNC: ::c_int = 1052672;
191191
pub const O_DSYNC: ::c_int = 4096;
192192

193+
pub const SOCK_NONBLOCK: ::c_int = 2048;
194+
193195
pub const MAP_ANON: ::c_int = 0x0020;
194196
pub const MAP_ANONYMOUS: ::c_int = 0x0020;
195197
pub const MAP_GROWSDOWN: ::c_int = 0x0100;

src/unix/notbsd/linux/other/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ pub const O_RSYNC: ::c_int = 1052672;
105105
pub const O_DSYNC: ::c_int = 4096;
106106
pub const O_FSYNC: ::c_int = 0x101000;
107107

108+
pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
109+
108110
pub const MAP_ANON: ::c_int = 0x0020;
109111
pub const MAP_ANONYMOUS: ::c_int = 0x0020;
110112
pub const MAP_GROWSDOWN: ::c_int = 0x0100;

src/unix/notbsd/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ pub const O_WRONLY: ::c_int = 1;
174174
pub const O_RDWR: ::c_int = 2;
175175
pub const O_TRUNC: ::c_int = 512;
176176
pub const O_CLOEXEC: ::c_int = 0x80000;
177+
178+
pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
179+
177180
pub const S_IFIFO: ::mode_t = 4096;
178181
pub const S_IFCHR: ::mode_t = 8192;
179182
pub const S_IFBLK: ::mode_t = 24576;

0 commit comments

Comments
 (0)