blob: 2da3a43154e7f74d685a6fb9b9ac88cc41da470c [file] [log] [blame]
Patrick Williams8e7b46e2023-05-01 14:19:06 -05001From e00da82cd46221bfb650895c9cea65082da66b4e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 8 Apr 2023 09:25:31 -0700
4Subject: [PATCH] musl: Define SOCK_SEQPACKET in common place
5
6This define is not architecture specific in musl [1]
7
8[1] https://git.musl-libc.org/cgit/musl/tree/include/sys/socket.h#n90
9
10Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/3191]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/unix/linux_like/linux/musl/b32/arm/mod.rs | 1 -
14 src/unix/linux_like/linux/musl/b32/hexagon.rs | 1 -
15 src/unix/linux_like/linux/musl/b32/mips/mod.rs | 1 -
16 src/unix/linux_like/linux/musl/b32/powerpc.rs | 1 -
17 src/unix/linux_like/linux/musl/b32/x86/mod.rs | 1 -
18 src/unix/linux_like/linux/musl/b64/mod.rs | 2 --
19 src/unix/linux_like/linux/musl/mod.rs | 1 +
20 7 files changed, 1 insertion(+), 7 deletions(-)
21
22--- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs
23+++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs
24@@ -324,7 +324,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;
25
26 pub const SOCK_STREAM: ::c_int = 1;
27 pub const SOCK_DGRAM: ::c_int = 2;
28-pub const SOCK_SEQPACKET: ::c_int = 5;
29
30 pub const EDEADLK: ::c_int = 35;
31 pub const ENAMETOOLONG: ::c_int = 36;
32--- a/src/unix/linux_like/linux/musl/b32/hexagon.rs
33+++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs
34@@ -292,7 +292,6 @@ pub const SIG_SETMASK: ::c_int = 2; // F
35 pub const SIG_BLOCK: ::c_int = 0x000000;
36 pub const SIG_UNBLOCK: ::c_int = 0x01;
37 pub const SOCK_DGRAM: ::c_int = 2;
38-pub const SOCK_SEQPACKET: ::c_int = 5;
39 pub const SOCK_STREAM: ::c_int = 1;
40 pub const SOL_CAIF: ::c_int = 278;
41 pub const SOL_IUCV: ::c_int = 277;
42--- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs
43+++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs
44@@ -348,7 +348,6 @@ pub const ERFKILL: ::c_int = 167;
45
46 pub const SOCK_STREAM: ::c_int = 2;
47 pub const SOCK_DGRAM: ::c_int = 1;
48-pub const SOCK_SEQPACKET: ::c_int = 5;
49
50 pub const SA_ONSTACK: ::c_int = 0x08000000;
51 pub const SA_SIGINFO: ::c_int = 8;
52--- a/src/unix/linux_like/linux/musl/b32/powerpc.rs
53+++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs
54@@ -255,7 +255,6 @@ pub const MAP_STACK: ::c_int = 0x020000;
55
56 pub const SOCK_STREAM: ::c_int = 1;
57 pub const SOCK_DGRAM: ::c_int = 2;
58-pub const SOCK_SEQPACKET: ::c_int = 5;
59
60 pub const EDEADLK: ::c_int = 35;
61 pub const ENAMETOOLONG: ::c_int = 36;
62--- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs
63+++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs
64@@ -313,7 +313,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;
65
66 pub const SOCK_STREAM: ::c_int = 1;
67 pub const SOCK_DGRAM: ::c_int = 2;
68-pub const SOCK_SEQPACKET: ::c_int = 5;
69
70 pub const EDEADLK: ::c_int = 35;
71 pub const ENAMETOOLONG: ::c_int = 36;
72--- a/src/unix/linux_like/linux/musl/b64/mod.rs
73+++ b/src/unix/linux_like/linux/musl/b64/mod.rs
74@@ -133,8 +133,6 @@ s! {
75 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
76 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
77
78-pub const SOCK_SEQPACKET: ::c_int = 5;
79-
80 extern "C" {
81 pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
82 }
83--- a/src/unix/linux_like/linux/musl/mod.rs
84+++ b/src/unix/linux_like/linux/musl/mod.rs
85@@ -530,6 +530,7 @@ pub const POSIX_MADV_DONTNEED: ::c_int =
86
87 pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
88
89+pub const SOCK_SEQPACKET: ::c_int = 5;
90 pub const SOCK_DCCP: ::c_int = 6;
91 pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
92 pub const SOCK_PACKET: ::c_int = 10;