Skip to content

Commit 9beae5d

Browse files
committed
Auto merge of #3191 - kraj:kraj/musl-fixes, r=JohnTitor
musl fixes and musl+riscv32 fixes
2 parents 7e3c99c + be7fd28 commit 9beae5d

File tree

10 files changed

+11
-41
lines changed

10 files changed

+11
-41
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ pub const O_SYNC: ::c_int = 1052672;
311311
pub const O_RSYNC: ::c_int = 1052672;
312312
pub const O_DSYNC: ::c_int = 4096;
313313

314-
pub const SOCK_NONBLOCK: ::c_int = 2048;
315-
316314
pub const MAP_ANON: ::c_int = 0x0020;
317315
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
318316
pub const MAP_DENYWRITE: ::c_int = 0x0800;
@@ -326,7 +324,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;
326324

327325
pub const SOCK_STREAM: ::c_int = 1;
328326
pub const SOCK_DGRAM: ::c_int = 2;
329-
pub const SOCK_SEQPACKET: ::c_int = 5;
330327

331328
pub const EDEADLK: ::c_int = 35;
332329
pub const ENAMETOOLONG: ::c_int = 36;
@@ -451,9 +448,6 @@ pub const F_GETOWN: ::c_int = 9;
451448
pub const F_SETLK: ::c_int = 13;
452449
pub const F_SETLKW: ::c_int = 14;
453450
pub const F_SETOWN: ::c_int = 8;
454-
pub const F_OFD_GETLK: ::c_int = 36;
455-
pub const F_OFD_SETLK: ::c_int = 37;
456-
pub const F_OFD_SETLKW: ::c_int = 38;
457451

458452
pub const VEOF: usize = 4;
459453
pub const VEOL: usize = 11;

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,6 @@ pub const F_GETOWN_EX: ::c_int = 16;
225225
pub const F_GETSIG: ::c_int = 11;
226226
pub const F_LINUX_SPECIFIC_BASE: ::c_int = 1024;
227227
pub const FLUSHO: ::c_int = 4096;
228-
pub const F_OFD_GETLK: ::c_int = 36;
229-
pub const F_OFD_SETLK: ::c_int = 37;
230-
pub const F_OFD_SETLKW: ::c_int = 38;
231228
pub const F_OWNER_PGRP: ::c_int = 2;
232229
pub const F_OWNER_PID: ::c_int = 1;
233230
pub const F_OWNER_TID: ::c_int = 0;
@@ -295,8 +292,6 @@ pub const SIG_SETMASK: ::c_int = 2; // FIXME check these
295292
pub const SIG_BLOCK: ::c_int = 0x000000;
296293
pub const SIG_UNBLOCK: ::c_int = 0x01;
297294
pub const SOCK_DGRAM: ::c_int = 2;
298-
pub const SOCK_NONBLOCK: ::c_int = 2048;
299-
pub const SOCK_SEQPACKET: ::c_int = 5;
300295
pub const SOCK_STREAM: ::c_int = 1;
301296
pub const SOL_CAIF: ::c_int = 278;
302297
pub const SOL_IUCV: ::c_int = 277;

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,6 @@ pub const O_SYNC: ::c_int = 0o40020;
250250
pub const O_RSYNC: ::c_int = 0o40020;
251251
pub const O_DSYNC: ::c_int = 0o020;
252252

253-
pub const SOCK_NONBLOCK: ::c_int = 0o200;
254-
255253
pub const MAP_ANON: ::c_int = 0x800;
256254
pub const MAP_GROWSDOWN: ::c_int = 0x1000;
257255
pub const MAP_DENYWRITE: ::c_int = 0x2000;
@@ -351,7 +349,6 @@ pub const ERFKILL: ::c_int = 167;
351349

352350
pub const SOCK_STREAM: ::c_int = 2;
353351
pub const SOCK_DGRAM: ::c_int = 1;
354-
pub const SOCK_SEQPACKET: ::c_int = 5;
355352

356353
pub const SA_ONSTACK: ::c_int = 0x08000000;
357354
pub const SA_SIGINFO: ::c_int = 8;
@@ -388,9 +385,6 @@ pub const F_GETOWN: ::c_int = 23;
388385
pub const F_SETLK: ::c_int = 34;
389386
pub const F_SETLKW: ::c_int = 35;
390387
pub const F_SETOWN: ::c_int = 24;
391-
pub const F_OFD_GETLK: ::c_int = 36;
392-
pub const F_OFD_SETLK: ::c_int = 37;
393-
pub const F_OFD_SETLKW: ::c_int = 38;
394388

395389
pub const VEOF: usize = 16;
396390
pub const VEOL: usize = 17;

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ pub const O_SYNC: ::c_int = 1052672;
243243
pub const O_RSYNC: ::c_int = 1052672;
244244
pub const O_DSYNC: ::c_int = 4096;
245245

246-
pub const SOCK_NONBLOCK: ::c_int = 2048;
247-
248246
pub const MAP_ANON: ::c_int = 0x0020;
249247
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
250248
pub const MAP_DENYWRITE: ::c_int = 0x0800;
@@ -259,7 +257,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;
259257

260258
pub const SOCK_STREAM: ::c_int = 1;
261259
pub const SOCK_DGRAM: ::c_int = 2;
262-
pub const SOCK_SEQPACKET: ::c_int = 5;
263260

264261
pub const EDEADLK: ::c_int = 35;
265262
pub const ENAMETOOLONG: ::c_int = 36;
@@ -384,9 +381,6 @@ pub const F_GETOWN: ::c_int = 9;
384381
pub const F_SETLK: ::c_int = 13;
385382
pub const F_SETLKW: ::c_int = 14;
386383
pub const F_SETOWN: ::c_int = 8;
387-
pub const F_OFD_GETLK: ::c_int = 36;
388-
pub const F_OFD_SETLK: ::c_int = 37;
389-
pub const F_OFD_SETLKW: ::c_int = 38;
390384

391385
pub const VEOF: usize = 4;
392386
pub const VEOL: usize = 6;

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,11 @@ pub const POLLWRBAND: ::c_short = 512;
339339
pub const O_ASYNC: ::c_int = 8192;
340340
pub const O_NDELAY: ::c_int = 2048;
341341
pub const EFD_NONBLOCK: ::c_int = 2048;
342-
pub const F_GETLK: ::c_int = 5;
343-
pub const F_GETOWN: ::c_int = 9;
344342
pub const F_SETOWN: ::c_int = 8;
343+
pub const F_GETOWN: ::c_int = 9;
344+
pub const F_GETLK: ::c_int = 12;
345+
pub const F_SETLK: ::c_int = 13;
346+
pub const F_SETLKW: ::c_int = 14;
345347
pub const SFD_NONBLOCK: ::c_int = 2048;
346348
pub const TCSANOW: ::c_int = 0;
347349
pub const TCSADRAIN: ::c_int = 1;
@@ -369,6 +371,7 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
369371
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
370372
pub const O_DIRECT: ::c_int = 16384;
371373
pub const O_DIRECTORY: ::c_int = 65536;
374+
pub const O_LARGEFILE: ::c_int = 0o0100000;
372375
pub const O_NOFOLLOW: ::c_int = 131072;
373376
pub const MAP_HUGETLB: ::c_int = 262144;
374377
pub const MAP_LOCKED: ::c_int = 8192;

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ pub const O_SYNC: ::c_int = 1052672;
300300
pub const O_RSYNC: ::c_int = 1052672;
301301
pub const O_DSYNC: ::c_int = 4096;
302302

303-
pub const SOCK_NONBLOCK: ::c_int = 2048;
304-
305303
pub const MAP_ANON: ::c_int = 0x0020;
306304
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
307305
pub const MAP_DENYWRITE: ::c_int = 0x0800;
@@ -315,7 +313,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;
315313

316314
pub const SOCK_STREAM: ::c_int = 1;
317315
pub const SOCK_DGRAM: ::c_int = 2;
318-
pub const SOCK_SEQPACKET: ::c_int = 5;
319316

320317
pub const EDEADLK: ::c_int = 35;
321318
pub const ENAMETOOLONG: ::c_int = 36;
@@ -441,9 +438,6 @@ pub const F_GETOWN: ::c_int = 9;
441438
pub const F_SETLK: ::c_int = 13;
442439
pub const F_SETLKW: ::c_int = 14;
443440
pub const F_SETOWN: ::c_int = 8;
444-
pub const F_OFD_GETLK: ::c_int = 36;
445-
pub const F_OFD_SETLK: ::c_int = 37;
446-
pub const F_OFD_SETLKW: ::c_int = 38;
447441

448442
pub const VEOF: usize = 4;
449443
pub const VEOL: usize = 11;

src/unix/linux_like/linux/musl/b64/aarch64/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@ pub const F_GETOWN: ::c_int = 9;
250250
pub const F_SETLK: ::c_int = 6;
251251
pub const F_SETLKW: ::c_int = 7;
252252
pub const F_SETOWN: ::c_int = 8;
253-
pub const F_OFD_GETLK: ::c_int = 36;
254-
pub const F_OFD_SETLK: ::c_int = 37;
255-
pub const F_OFD_SETLKW: ::c_int = 38;
256253

257254
pub const VEOF: usize = 4;
258255

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,6 @@ pub const F_GETOWN: ::c_int = 23;
612612
pub const F_SETOWN: ::c_int = 24;
613613
pub const F_SETLK: ::c_int = 6;
614614
pub const F_SETLKW: ::c_int = 7;
615-
pub const F_OFD_GETLK: ::c_int = 36;
616-
pub const F_OFD_SETLK: ::c_int = 37;
617-
pub const F_OFD_SETLKW: ::c_int = 38;
618615

619616
pub const MCL_CURRENT: ::c_int = 0x0001;
620617
pub const MCL_FUTURE: ::c_int = 0x0002;

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
134134
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
135135
pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32;
136136

137-
pub const SOCK_NONBLOCK: ::c_int = 2048;
138-
139-
pub const SOCK_SEQPACKET: ::c_int = 5;
140-
141137
extern "C" {
142138
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
143139
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ pub const ECOMM: ::c_int = 70;
506506
pub const EPROTO: ::c_int = 71;
507507
pub const EDOTDOT: ::c_int = 73;
508508

509+
pub const F_OFD_GETLK: ::c_int = 36;
510+
pub const F_OFD_SETLK: ::c_int = 37;
511+
pub const F_OFD_SETLKW: ::c_int = 38;
512+
509513
pub const F_RDLCK: ::c_int = 0;
510514
pub const F_WRLCK: ::c_int = 1;
511515
pub const F_UNLCK: ::c_int = 2;
@@ -535,7 +539,9 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4;
535539

536540
pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
537541

542+
pub const SOCK_SEQPACKET: ::c_int = 5;
538543
pub const SOCK_DCCP: ::c_int = 6;
544+
pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
539545
pub const SOCK_PACKET: ::c_int = 10;
540546

541547
pub const SOMAXCONN: ::c_int = 128;

0 commit comments

Comments
 (0)