Skip to content

Commit 8a75ed8

Browse files
committed
Fix SOCK_SEQPACKET and MAP_SYNC on musl powerpc and s390.
- On powerpc musl, add definitions for `MAP_HUGETLB` and `MAP_SYNC`. - On powerpc64 musl, add a definition for `SOCK_SEQPACKET`. - On s390x musl, add definitions for `SOCK_SEQPACKET` and `MAP_SYNC`. - On mips, just move the existing `MAP_HUGETLB` definition to be near the other `MAP_*` constants.
1 parent da4f8f8 commit 8a75ed8

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/unix/linux_like/linux/musl/b32/mips/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ pub const MAP_NORESERVE: ::c_int = 0x0400;
261261
pub const MAP_POPULATE: ::c_int = 0x10000;
262262
pub const MAP_NONBLOCK: ::c_int = 0x20000;
263263
pub const MAP_STACK: ::c_int = 0x40000;
264+
pub const MAP_HUGETLB: ::c_int = 0x80000;
264265

265266
pub const EDEADLK: ::c_int = 45;
266267
pub const ENAMETOOLONG: ::c_int = 78;
@@ -382,8 +383,6 @@ pub const SIG_UNBLOCK: ::c_int = 2;
382383

383384
pub const EXTPROC: ::tcflag_t = 0o200000;
384385

385-
pub const MAP_HUGETLB: ::c_int = 0x80000;
386-
387386
pub const F_GETLK: ::c_int = 33;
388387
pub const F_GETOWN: ::c_int = 23;
389388
pub const F_SETLK: ::c_int = 34;

src/unix/linux_like/linux/musl/b32/powerpc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ pub const MAP_NORESERVE: ::c_int = 0x00040;
254254
pub const MAP_POPULATE: ::c_int = 0x08000;
255255
pub const MAP_NONBLOCK: ::c_int = 0x010000;
256256
pub const MAP_STACK: ::c_int = 0x020000;
257+
pub const MAP_HUGETLB: ::c_int = 0x040000;
258+
pub const MAP_SYNC: ::c_int = 0x080000;
257259

258260
pub const SOCK_STREAM: ::c_int = 1;
259261
pub const SOCK_DGRAM: ::c_int = 2;

src/unix/linux_like/linux/musl/b64/powerpc64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ pub const MAP_SYNC: ::c_int = 0x080000;
175175

176176
pub const SOCK_STREAM: ::c_int = 1;
177177
pub const SOCK_DGRAM: ::c_int = 2;
178+
pub const SOCK_SEQPACKET: ::c_int = 5;
178179

179180
pub const SA_ONSTACK: ::c_int = 0x08000000;
180181
pub const SA_SIGINFO: ::c_int = 0x00000004;

src/unix/linux_like/linux/musl/b64/s390x.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ pub const SIG_SETMASK: ::c_int = 2;
156156

157157
pub const SOCK_STREAM: ::c_int = 1;
158158
pub const SOCK_DGRAM: ::c_int = 2;
159+
pub const SOCK_SEQPACKET: ::c_int = 5;
159160

160161
pub const O_NOCTTY: ::c_int = 256;
161162
pub const O_SYNC: ::c_int = 1052672;
@@ -177,6 +178,7 @@ pub const MAP_POPULATE: ::c_int = 0x08000;
177178
pub const MAP_NONBLOCK: ::c_int = 0x010000;
178179
pub const MAP_STACK: ::c_int = 0x020000;
179180
pub const MAP_HUGETLB: ::c_int = 0x040000;
181+
pub const MAP_SYNC: ::c_int = 0x080000;
180182

181183
pub const EDEADLOCK: ::c_int = 35;
182184
pub const ENAMETOOLONG: ::c_int = 36;

0 commit comments

Comments
 (0)