@@ -375,6 +375,7 @@ pub const EPROTONOSUPPORT: ::c_int = 93; /* Protocol not supported */
375
375
pub const ESOCKTNOSUPPORT : :: c_int = 94 ; /* Socket type not supported */
376
376
/* Operation not supported on transport endpoint */
377
377
pub const EOPNOTSUPP : :: c_int = 95 ;
378
+ pub const ENOTSUP : :: c_int = EOPNOTSUPP ;
378
379
pub const EPFNOSUPPORT : :: c_int = 96 ; /* Protocol family not supported */
379
380
/* Address family not supported by protocol */
380
381
pub const EAFNOSUPPORT : :: c_int = 97 ;
@@ -615,6 +616,7 @@ pub const EXIT_FAILURE: ::c_int = 1;
615
616
616
617
// sys/ioctl.h
617
618
// FIXME: relibc {
619
+ pub const FIONREAD : :: c_ulong = 0x541B ;
618
620
pub const FIONBIO : :: c_ulong = 0x5421 ;
619
621
pub const FIOCLEX : :: c_ulong = 0x5451 ;
620
622
// }
@@ -661,6 +663,7 @@ pub const MSG_EOR: ::c_int = 128;
661
663
pub const MSG_OOB : :: c_int = 1 ;
662
664
pub const MSG_PEEK : :: c_int = 2 ;
663
665
pub const MSG_TRUNC : :: c_int = 32 ;
666
+ pub const MSG_DONTWAIT : :: c_int = 64 ;
664
667
pub const MSG_WAITALL : :: c_int = 256 ;
665
668
pub const SHUT_RD : :: c_int = 0 ;
666
669
pub const SHUT_WR : :: c_int = 1 ;
@@ -1028,6 +1031,7 @@ extern "C" {
1028
1031
pub fn ioctl ( fd : :: c_int , request : :: c_ulong , ...) -> :: c_int ;
1029
1032
1030
1033
// sys/mman.h
1034
+ pub fn madvise ( addr : * mut :: c_void , len : :: size_t , advice : :: c_int ) -> :: c_int ;
1031
1035
pub fn msync ( addr : * mut :: c_void , len : :: size_t , flags : :: c_int ) -> :: c_int ;
1032
1036
pub fn mprotect ( addr : * mut :: c_void , len : :: size_t , prot : :: c_int ) -> :: c_int ;
1033
1037
pub fn shm_open ( name : * const c_char , oflag : :: c_int , mode : mode_t ) -> :: c_int ;
0 commit comments