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

musl fixes and musl+riscv32 fixes #3302

Merged
merged 5 commits into from Oct 27, 2023
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
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/musl/b32/arm/mod.rs
Expand Up @@ -312,8 +312,6 @@ 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_GROWSDOWN: ::c_int = 0x0100;
pub const MAP_DENYWRITE: ::c_int = 0x0800;
Expand All @@ -327,7 +325,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;

pub const SOCK_STREAM: ::c_int = 1;
pub const SOCK_DGRAM: ::c_int = 2;
pub const SOCK_SEQPACKET: ::c_int = 5;

pub const EDEADLK: ::c_int = 35;
pub const ENAMETOOLONG: ::c_int = 36;
Expand Down Expand Up @@ -452,9 +449,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETLK: ::c_int = 13;
pub const F_SETLKW: ::c_int = 14;
pub const F_SETOWN: ::c_int = 8;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 4;
pub const VEOL: usize = 11;
Expand Down
5 changes: 0 additions & 5 deletions src/unix/linux_like/linux/musl/b32/hexagon.rs
Expand Up @@ -225,9 +225,6 @@ pub const F_GETOWN_EX: ::c_int = 16;
pub const F_GETSIG: ::c_int = 11;
pub const F_LINUX_SPECIFIC_BASE: ::c_int = 1024;
pub const FLUSHO: ::c_int = 4096;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;
pub const F_OWNER_PGRP: ::c_int = 2;
pub const F_OWNER_PID: ::c_int = 1;
pub const F_OWNER_TID: ::c_int = 0;
Expand Down Expand Up @@ -294,8 +291,6 @@ pub const SIG_SETMASK: ::c_int = 2; // FIXME check these
pub const SIG_BLOCK: ::c_int = 0x000000;
pub const SIG_UNBLOCK: ::c_int = 0x01;
pub const SOCK_DGRAM: ::c_int = 2;
pub const SOCK_NONBLOCK: ::c_int = 2048;
pub const SOCK_SEQPACKET: ::c_int = 5;
pub const SOCK_STREAM: ::c_int = 1;
pub const SOL_CAIF: ::c_int = 278;
pub const SOL_IUCV: ::c_int = 277;
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/musl/b32/mips/mod.rs
Expand Up @@ -251,8 +251,6 @@ pub const O_SYNC: ::c_int = 0o40020;
pub const O_RSYNC: ::c_int = 0o40020;
pub const O_DSYNC: ::c_int = 0o020;

pub const SOCK_NONBLOCK: ::c_int = 0o200;

pub const MAP_ANON: ::c_int = 0x800;
pub const MAP_GROWSDOWN: ::c_int = 0x1000;
pub const MAP_DENYWRITE: ::c_int = 0x2000;
Expand Down Expand Up @@ -352,7 +350,6 @@ pub const ERFKILL: ::c_int = 167;

pub const SOCK_STREAM: ::c_int = 2;
pub const SOCK_DGRAM: ::c_int = 1;
pub const SOCK_SEQPACKET: ::c_int = 5;

pub const SA_ONSTACK: ::c_int = 0x08000000;
pub const SA_SIGINFO: ::c_int = 8;
Expand Down Expand Up @@ -389,9 +386,6 @@ pub const F_GETOWN: ::c_int = 23;
pub const F_SETLK: ::c_int = 34;
pub const F_SETLKW: ::c_int = 35;
pub const F_SETOWN: ::c_int = 24;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 16;
pub const VEOL: usize = 17;
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/musl/b32/powerpc.rs
Expand Up @@ -244,8 +244,6 @@ 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_GROWSDOWN: ::c_int = 0x0100;
pub const MAP_DENYWRITE: ::c_int = 0x0800;
Expand All @@ -263,7 +261,6 @@ pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e;

pub const SOCK_STREAM: ::c_int = 1;
pub const SOCK_DGRAM: ::c_int = 2;
pub const SOCK_SEQPACKET: ::c_int = 5;

pub const EDEADLK: ::c_int = 35;
pub const ENAMETOOLONG: ::c_int = 36;
Expand Down Expand Up @@ -386,9 +383,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETLK: ::c_int = 13;
pub const F_SETLKW: ::c_int = 14;
pub const F_SETOWN: ::c_int = 8;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 4;
pub const VEOL: usize = 6;
Expand Down
7 changes: 5 additions & 2 deletions src/unix/linux_like/linux/musl/b32/riscv32/mod.rs
Expand Up @@ -323,9 +323,11 @@ pub const POLLWRBAND: ::c_short = 512;
pub const O_ASYNC: ::c_int = 8192;
pub const O_NDELAY: ::c_int = 2048;
pub const EFD_NONBLOCK: ::c_int = 2048;
pub const F_GETLK: ::c_int = 5;
pub const F_GETOWN: ::c_int = 9;
pub const F_SETOWN: ::c_int = 8;
pub const F_GETOWN: ::c_int = 9;
pub const F_GETLK: ::c_int = 12;
pub const F_SETLK: ::c_int = 13;
pub const F_SETLKW: ::c_int = 14;
pub const SFD_NONBLOCK: ::c_int = 2048;
pub const TCSANOW: ::c_int = 0;
pub const TCSADRAIN: ::c_int = 1;
Expand Down Expand Up @@ -353,6 +355,7 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
pub const O_DIRECT: ::c_int = 16384;
pub const O_DIRECTORY: ::c_int = 65536;
pub const O_LARGEFILE: ::c_int = 0o0100000;
pub const O_NOFOLLOW: ::c_int = 131072;
pub const MAP_HUGETLB: ::c_int = 262144;
pub const MAP_LOCKED: ::c_int = 8192;
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/musl/b32/x86/mod.rs
Expand Up @@ -301,8 +301,6 @@ 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_GROWSDOWN: ::c_int = 0x0100;
pub const MAP_DENYWRITE: ::c_int = 0x0800;
Expand All @@ -316,7 +314,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;

pub const SOCK_STREAM: ::c_int = 1;
pub const SOCK_DGRAM: ::c_int = 2;
pub const SOCK_SEQPACKET: ::c_int = 5;

pub const EDEADLK: ::c_int = 35;
pub const ENAMETOOLONG: ::c_int = 36;
Expand Down Expand Up @@ -442,9 +439,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETLK: ::c_int = 13;
pub const F_SETLKW: ::c_int = 14;
pub const F_SETOWN: ::c_int = 8;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 4;
pub const VEOL: usize = 11;
Expand Down
3 changes: 0 additions & 3 deletions src/unix/linux_like/linux/musl/b64/aarch64/mod.rs
Expand Up @@ -250,9 +250,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_SETOWN: ::c_int = 8;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 4;

Expand Down
3 changes: 0 additions & 3 deletions src/unix/linux_like/linux/musl/b64/mips64.rs
Expand Up @@ -612,9 +612,6 @@ pub const F_GETOWN: ::c_int = 23;
pub const F_SETOWN: ::c_int = 24;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
Expand Down
4 changes: 0 additions & 4 deletions src/unix/linux_like/linux/musl/b64/mod.rs
Expand Up @@ -134,10 +134,6 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32;

pub const SOCK_NONBLOCK: ::c_int = 2048;

pub const SOCK_SEQPACKET: ::c_int = 5;

extern "C" {
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
}
Expand Down
3 changes: 0 additions & 3 deletions src/unix/linux_like/linux/musl/b64/powerpc64.rs
Expand Up @@ -212,9 +212,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_SETOWN: ::c_int = 8;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 4;

Expand Down
3 changes: 0 additions & 3 deletions src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
Expand Up @@ -604,9 +604,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_SETOWN: ::c_int = 8;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 4;

Expand Down
3 changes: 0 additions & 3 deletions src/unix/linux_like/linux/musl/b64/s390x.rs
Expand Up @@ -297,9 +297,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETOWN: ::c_int = 8;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VTIME: usize = 5;
pub const VSWTC: usize = 7;
Expand Down
3 changes: 0 additions & 3 deletions src/unix/linux_like/linux/musl/b64/x86_64/mod.rs
Expand Up @@ -805,9 +805,6 @@ pub const F_GETOWN: ::c_int = 9;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_SETOWN: ::c_int = 8;
pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const VEOF: usize = 4;

Expand Down
6 changes: 6 additions & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Expand Up @@ -512,6 +512,10 @@ pub const ECOMM: ::c_int = 70;
pub const EPROTO: ::c_int = 71;
pub const EDOTDOT: ::c_int = 73;

pub const F_OFD_GETLK: ::c_int = 36;
pub const F_OFD_SETLK: ::c_int = 37;
pub const F_OFD_SETLKW: ::c_int = 38;

pub const F_RDLCK: ::c_int = 0;
pub const F_WRLCK: ::c_int = 1;
pub const F_UNLCK: ::c_int = 2;
Expand Down Expand Up @@ -541,7 +545,9 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4;

pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;

pub const SOCK_SEQPACKET: ::c_int = 5;
pub const SOCK_DCCP: ::c_int = 6;
pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
pub const SOCK_PACKET: ::c_int = 10;

pub const SOMAXCONN: ::c_int = 128;
Expand Down