Skip to content

Commit e96f3ab

Browse files
committed
Auto merge of #2966 - redox-os:redox-0.2.135, r=JohnTitor
Redox updates Adds some missing constants and functions for Redox
2 parents 9bff92d + c09d65f commit e96f3ab

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libc-test/semver/redox.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ ENOSTR
5858
ENOTBLK
5959
ENOTNAM
6060
ENOTRECOVERABLE
61+
ENOTSUP
6162
ENOTUNIQ
6263
EOWNERDEAD
6364
EPOLLERR
@@ -93,11 +94,13 @@ EUCLEAN
9394
EUNATCH
9495
EUSERS
9596
EXFULL
97+
FIONREAD
9698
IMAXBEL
9799
IPV6_ADD_MEMBERSHIP
98100
IPV6_DROP_MEMBERSHIP
99101
IUCLC
100102
IUTF8
103+
MSG_DONTWAIT
101104
NI_DGRAM
102105
NI_MAXSERV
103106
NI_NAMEREQD
@@ -187,6 +190,7 @@ getservbyport
187190
getservent
188191
killpg
189192
lockf
193+
madvise
190194
memalign
191195
nice
192196
open_memstream

src/unix/redox/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ pub const EPROTONOSUPPORT: ::c_int = 93; /* Protocol not supported */
375375
pub const ESOCKTNOSUPPORT: ::c_int = 94; /* Socket type not supported */
376376
/* Operation not supported on transport endpoint */
377377
pub const EOPNOTSUPP: ::c_int = 95;
378+
pub const ENOTSUP: ::c_int = EOPNOTSUPP;
378379
pub const EPFNOSUPPORT: ::c_int = 96; /* Protocol family not supported */
379380
/* Address family not supported by protocol */
380381
pub const EAFNOSUPPORT: ::c_int = 97;
@@ -615,6 +616,7 @@ pub const EXIT_FAILURE: ::c_int = 1;
615616

616617
// sys/ioctl.h
617618
// FIXME: relibc {
619+
pub const FIONREAD: ::c_ulong = 0x541B;
618620
pub const FIONBIO: ::c_ulong = 0x5421;
619621
pub const FIOCLEX: ::c_ulong = 0x5451;
620622
// }
@@ -661,6 +663,7 @@ pub const MSG_EOR: ::c_int = 128;
661663
pub const MSG_OOB: ::c_int = 1;
662664
pub const MSG_PEEK: ::c_int = 2;
663665
pub const MSG_TRUNC: ::c_int = 32;
666+
pub const MSG_DONTWAIT: ::c_int = 64;
664667
pub const MSG_WAITALL: ::c_int = 256;
665668
pub const SHUT_RD: ::c_int = 0;
666669
pub const SHUT_WR: ::c_int = 1;
@@ -1028,6 +1031,7 @@ extern "C" {
10281031
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
10291032

10301033
// sys/mman.h
1034+
pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int;
10311035
pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
10321036
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int;
10331037
pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int;

0 commit comments

Comments
 (0)