Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redox updates #2966

Merged
merged 1 commit into from Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions libc-test/semver/redox.txt
Expand Up @@ -58,6 +58,7 @@ ENOSTR
ENOTBLK
ENOTNAM
ENOTRECOVERABLE
ENOTSUP
ENOTUNIQ
EOWNERDEAD
EPOLLERR
Expand Down Expand Up @@ -93,11 +94,13 @@ EUCLEAN
EUNATCH
EUSERS
EXFULL
FIONREAD
IMAXBEL
IPV6_ADD_MEMBERSHIP
IPV6_DROP_MEMBERSHIP
IUCLC
IUTF8
MSG_DONTWAIT
NI_DGRAM
NI_MAXSERV
NI_NAMEREQD
Expand Down Expand Up @@ -187,6 +190,7 @@ getservbyport
getservent
killpg
lockf
madvise
memalign
nice
open_memstream
Expand Down
4 changes: 4 additions & 0 deletions src/unix/redox/mod.rs
Expand Up @@ -375,6 +375,7 @@ pub const EPROTONOSUPPORT: ::c_int = 93; /* Protocol not supported */
pub const ESOCKTNOSUPPORT: ::c_int = 94; /* Socket type not supported */
/* Operation not supported on transport endpoint */
pub const EOPNOTSUPP: ::c_int = 95;
pub const ENOTSUP: ::c_int = EOPNOTSUPP;
pub const EPFNOSUPPORT: ::c_int = 96; /* Protocol family not supported */
/* Address family not supported by protocol */
pub const EAFNOSUPPORT: ::c_int = 97;
Expand Down Expand Up @@ -615,6 +616,7 @@ pub const EXIT_FAILURE: ::c_int = 1;

// sys/ioctl.h
// FIXME: relibc {
pub const FIONREAD: ::c_ulong = 0x541B;
pub const FIONBIO: ::c_ulong = 0x5421;
pub const FIOCLEX: ::c_ulong = 0x5451;
// }
Expand Down Expand Up @@ -661,6 +663,7 @@ pub const MSG_EOR: ::c_int = 128;
pub const MSG_OOB: ::c_int = 1;
pub const MSG_PEEK: ::c_int = 2;
pub const MSG_TRUNC: ::c_int = 32;
pub const MSG_DONTWAIT: ::c_int = 64;
pub const MSG_WAITALL: ::c_int = 256;
pub const SHUT_RD: ::c_int = 0;
pub const SHUT_WR: ::c_int = 1;
Expand Down Expand Up @@ -1028,6 +1031,7 @@ extern "C" {
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;

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