From e7d95c45861b596c3bf01606a7fc151e365041b2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Apr 2023 08:25:46 -0700 Subject: [PATCH 1/5] musl: Define SOCK_NONBLOCK with O_NONBLOCK Much like glibc, these defines are same on musl [1] [2] therefore consolidate the definition in one place for SOCK_NONBLOCK [1] https://github.com/search?q=repo%3Abminor%2Fmusl++%22%23define+SOCK_NONBLOCK%22&type=code [2] https://github.com/search?q=repo%3Abminor%2Fmusl++%22%23define+O_NONBLOCK%22&type=code --- src/unix/linux_like/linux/musl/b32/arm/mod.rs | 2 -- src/unix/linux_like/linux/musl/b32/hexagon.rs | 1 - src/unix/linux_like/linux/musl/b32/mips/mod.rs | 2 -- src/unix/linux_like/linux/musl/b32/powerpc.rs | 2 -- src/unix/linux_like/linux/musl/b32/x86/mod.rs | 2 -- src/unix/linux_like/linux/musl/b64/mod.rs | 2 -- src/unix/linux_like/linux/musl/mod.rs | 1 + 7 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/src/unix/linux_like/linux/musl/b32/arm/mod.rs index c47fa2c4cfda9..bddd34fcc8f9d 100644 --- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -311,8 +311,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; diff --git a/src/unix/linux_like/linux/musl/b32/hexagon.rs b/src/unix/linux_like/linux/musl/b32/hexagon.rs index f83d208d5fe8f..7e18338b426a5 100644 --- a/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -295,7 +295,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; diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index d09b8278e5f1c..6202713ccd652 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -250,8 +250,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; diff --git a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs index ec4f2047e46b2..234e1816c7863 100644 --- a/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -243,8 +243,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; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index aaca917fa03cd..67940eee1f648 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -300,8 +300,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; diff --git a/src/unix/linux_like/linux/musl/b64/mod.rs b/src/unix/linux_like/linux/musl/b64/mod.rs index f437355d900cb..1400d2b96d7da 100644 --- a/src/unix/linux_like/linux/musl/b64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/mod.rs @@ -134,8 +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" { diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 4c605338972e3..b6e7d685fc67c 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -542,6 +542,7 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4; pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; 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; From 3a56ee59334b7fcff6125b1a3e84290170ffe522 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Apr 2023 08:51:02 -0700 Subject: [PATCH 2/5] musl/riscv32: Define F_SETLK, F_SETLKW and fix F_GETLK F_SETLK and F_SETLKW were not defined therefore define them and F_GETLK value was not matching the musl port hence fixed --- src/unix/linux_like/linux/musl/b32/riscv32/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs index bf7a4f59c7945..126cd22ee4806 100644 --- a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs @@ -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; From ba7bad1998c6ad57014fd602104163188cd0cf49 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Apr 2023 09:01:54 -0700 Subject: [PATCH 3/5] musl: Move F_OFD_GETLK, F_OFD_SETLK and F_OFD_SETLKW to common location These defines are not architecture specific in musl [1] therefore move them to be common [1] https://git.musl-libc.org/cgit/musl/tree/include/fcntl.h#n48 --- src/unix/linux_like/linux/musl/b32/arm/mod.rs | 3 --- src/unix/linux_like/linux/musl/b32/hexagon.rs | 3 --- src/unix/linux_like/linux/musl/b32/mips/mod.rs | 3 --- src/unix/linux_like/linux/musl/b32/powerpc.rs | 3 --- src/unix/linux_like/linux/musl/b32/x86/mod.rs | 3 --- src/unix/linux_like/linux/musl/b64/aarch64/mod.rs | 3 --- src/unix/linux_like/linux/musl/b64/mips64.rs | 3 --- src/unix/linux_like/linux/musl/b64/powerpc64.rs | 3 --- src/unix/linux_like/linux/musl/b64/riscv64/mod.rs | 3 --- src/unix/linux_like/linux/musl/b64/s390x.rs | 3 --- src/unix/linux_like/linux/musl/b64/x86_64/mod.rs | 3 --- src/unix/linux_like/linux/musl/mod.rs | 4 ++++ 12 files changed, 4 insertions(+), 33 deletions(-) diff --git a/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/src/unix/linux_like/linux/musl/b32/arm/mod.rs index bddd34fcc8f9d..7a53bc0ff2e30 100644 --- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -449,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; diff --git a/src/unix/linux_like/linux/musl/b32/hexagon.rs b/src/unix/linux_like/linux/musl/b32/hexagon.rs index 7e18338b426a5..9e4dc741b939f 100644 --- a/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -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; diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index 6202713ccd652..023da2ccfc0be 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -386,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; diff --git a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs index 234e1816c7863..0c650e92c5b90 100644 --- a/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -383,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; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index 67940eee1f648..0b5bb6afce9cf 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -439,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; diff --git a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 14b4bc6d68b87..522493ff374f2 100644 --- a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -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; diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs index 22ac916909346..c7f041260683c 100644 --- a/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -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; diff --git a/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/src/unix/linux_like/linux/musl/b64/powerpc64.rs index c9bd94135c9a4..882b6b538aca9 100644 --- a/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -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; diff --git a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs index 9e9dbf6c83097..bcbc3ef211e46 100644 --- a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs @@ -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; diff --git a/src/unix/linux_like/linux/musl/b64/s390x.rs b/src/unix/linux_like/linux/musl/b64/s390x.rs index f338dcc54a7ec..58806698922bf 100644 --- a/src/unix/linux_like/linux/musl/b64/s390x.rs +++ b/src/unix/linux_like/linux/musl/b64/s390x.rs @@ -296,9 +296,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; diff --git a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index 9decf91bcc63a..8aa57f7c628fb 100644 --- a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -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; diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index b6e7d685fc67c..8bd9696bcff41 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -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; From 08dd6635f253f4ad54c4bac429e4214d952411f7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Apr 2023 09:19:53 -0700 Subject: [PATCH 4/5] musl: Define O_LARGEFILE for riscv32 --- src/unix/linux_like/linux/musl/b32/riscv32/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs index 126cd22ee4806..decf92f4498ca 100644 --- a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs @@ -355,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; From 06a97777286e86fba5394db23b8bd87f63373f23 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Apr 2023 09:25:31 -0700 Subject: [PATCH 5/5] musl: Define SOCK_SEQPACKET in common place This define is not architecture specific in musl [1] [1] https://git.musl-libc.org/cgit/musl/tree/include/sys/socket.h#n90 Signed-off-by: Khem Raj --- src/unix/linux_like/linux/musl/b32/arm/mod.rs | 1 - src/unix/linux_like/linux/musl/b32/hexagon.rs | 1 - src/unix/linux_like/linux/musl/b32/mips/mod.rs | 1 - src/unix/linux_like/linux/musl/b32/powerpc.rs | 1 - src/unix/linux_like/linux/musl/b32/x86/mod.rs | 1 - src/unix/linux_like/linux/musl/b64/mod.rs | 2 -- src/unix/linux_like/linux/musl/mod.rs | 1 + 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/src/unix/linux_like/linux/musl/b32/arm/mod.rs index 7a53bc0ff2e30..15272fc0fd740 100644 --- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -324,7 +324,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; diff --git a/src/unix/linux_like/linux/musl/b32/hexagon.rs b/src/unix/linux_like/linux/musl/b32/hexagon.rs index 9e4dc741b939f..b58429f6ad287 100644 --- a/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -292,7 +292,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_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; diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index 023da2ccfc0be..df9826b70b27e 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -349,7 +349,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; diff --git a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs index 0c650e92c5b90..ac337d3dd7807 100644 --- a/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -260,7 +260,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; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index 0b5bb6afce9cf..3d5b9055b0c4b 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -313,7 +313,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; diff --git a/src/unix/linux_like/linux/musl/b64/mod.rs b/src/unix/linux_like/linux/musl/b64/mod.rs index 1400d2b96d7da..05586cdb44b68 100644 --- a/src/unix/linux_like/linux/musl/b64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/mod.rs @@ -134,8 +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_SEQPACKET: ::c_int = 5; - extern "C" { pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; } diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 8bd9696bcff41..9ce186fe9aed2 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -545,6 +545,7 @@ 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;