Skip to content

Commit 5e32df0

Browse files
committed
Auto merge of #3302 - akiernan:akiernan/musl-fixes, r=JohnTitor
musl fixes and musl+riscv32 fixes https://github.com/kraj/libc/tree/kraj/musl-fixes rebased onto main with the duplicate symbols fixed up (though the logs from the previous run have expired so I might have missed something). Closes #3191
2 parents 4e3317f + e955ae7 commit 5e32df0

File tree

14 files changed

+11
-53
lines changed

14 files changed

+11
-53
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
@@ -312,8 +312,6 @@ pub const O_SYNC: ::c_int = 1052672;
312312
pub const O_RSYNC: ::c_int = 1052672;
313313
pub const O_DSYNC: ::c_int = 4096;
314314

315-
pub const SOCK_NONBLOCK: ::c_int = 2048;
316-
317315
pub const MAP_ANON: ::c_int = 0x0020;
318316
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
319317
pub const MAP_DENYWRITE: ::c_int = 0x0800;
@@ -327,7 +325,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;
327325

328326
pub const SOCK_STREAM: ::c_int = 1;
329327
pub const SOCK_DGRAM: ::c_int = 2;
330-
pub const SOCK_SEQPACKET: ::c_int = 5;
331328

332329
pub const EDEADLK: ::c_int = 35;
333330
pub const ENAMETOOLONG: ::c_int = 36;
@@ -452,9 +449,6 @@ pub const F_GETOWN: ::c_int = 9;
452449
pub const F_SETLK: ::c_int = 13;
453450
pub const F_SETLKW: ::c_int = 14;
454451
pub const F_SETOWN: ::c_int = 8;
455-
pub const F_OFD_GETLK: ::c_int = 36;
456-
pub const F_OFD_SETLK: ::c_int = 37;
457-
pub const F_OFD_SETLKW: ::c_int = 38;
458452

459453
pub const VEOF: usize = 4;
460454
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;
@@ -294,8 +291,6 @@ pub const SIG_SETMASK: ::c_int = 2; // FIXME check these
294291
pub const SIG_BLOCK: ::c_int = 0x000000;
295292
pub const SIG_UNBLOCK: ::c_int = 0x01;
296293
pub const SOCK_DGRAM: ::c_int = 2;
297-
pub const SOCK_NONBLOCK: ::c_int = 2048;
298-
pub const SOCK_SEQPACKET: ::c_int = 5;
299294
pub const SOCK_STREAM: ::c_int = 1;
300295
pub const SOL_CAIF: ::c_int = 278;
301296
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
@@ -251,8 +251,6 @@ pub const O_SYNC: ::c_int = 0o40020;
251251
pub const O_RSYNC: ::c_int = 0o40020;
252252
pub const O_DSYNC: ::c_int = 0o020;
253253

254-
pub const SOCK_NONBLOCK: ::c_int = 0o200;
255-
256254
pub const MAP_ANON: ::c_int = 0x800;
257255
pub const MAP_GROWSDOWN: ::c_int = 0x1000;
258256
pub const MAP_DENYWRITE: ::c_int = 0x2000;
@@ -352,7 +350,6 @@ pub const ERFKILL: ::c_int = 167;
352350

353351
pub const SOCK_STREAM: ::c_int = 2;
354352
pub const SOCK_DGRAM: ::c_int = 1;
355-
pub const SOCK_SEQPACKET: ::c_int = 5;
356353

357354
pub const SA_ONSTACK: ::c_int = 0x08000000;
358355
pub const SA_SIGINFO: ::c_int = 8;
@@ -389,9 +386,6 @@ pub const F_GETOWN: ::c_int = 23;
389386
pub const F_SETLK: ::c_int = 34;
390387
pub const F_SETLKW: ::c_int = 35;
391388
pub const F_SETOWN: ::c_int = 24;
392-
pub const F_OFD_GETLK: ::c_int = 36;
393-
pub const F_OFD_SETLK: ::c_int = 37;
394-
pub const F_OFD_SETLKW: ::c_int = 38;
395389

396390
pub const VEOF: usize = 16;
397391
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
@@ -244,8 +244,6 @@ pub const O_SYNC: ::c_int = 1052672;
244244
pub const O_RSYNC: ::c_int = 1052672;
245245
pub const O_DSYNC: ::c_int = 4096;
246246

247-
pub const SOCK_NONBLOCK: ::c_int = 2048;
248-
249247
pub const MAP_ANON: ::c_int = 0x0020;
250248
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
251249
pub const MAP_DENYWRITE: ::c_int = 0x0800;
@@ -263,7 +261,6 @@ pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e;
263261

264262
pub const SOCK_STREAM: ::c_int = 1;
265263
pub const SOCK_DGRAM: ::c_int = 2;
266-
pub const SOCK_SEQPACKET: ::c_int = 5;
267264

268265
pub const EDEADLK: ::c_int = 35;
269266
pub const ENAMETOOLONG: ::c_int = 36;
@@ -386,9 +383,6 @@ pub const F_GETOWN: ::c_int = 9;
386383
pub const F_SETLK: ::c_int = 13;
387384
pub const F_SETLKW: ::c_int = 14;
388385
pub const F_SETOWN: ::c_int = 8;
389-
pub const F_OFD_GETLK: ::c_int = 36;
390-
pub const F_OFD_SETLK: ::c_int = 37;
391-
pub const F_OFD_SETLKW: ::c_int = 38;
392386

393387
pub const VEOF: usize = 4;
394388
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
@@ -323,9 +323,11 @@ pub const POLLWRBAND: ::c_short = 512;
323323
pub const O_ASYNC: ::c_int = 8192;
324324
pub const O_NDELAY: ::c_int = 2048;
325325
pub const EFD_NONBLOCK: ::c_int = 2048;
326-
pub const F_GETLK: ::c_int = 5;
327-
pub const F_GETOWN: ::c_int = 9;
328326
pub const F_SETOWN: ::c_int = 8;
327+
pub const F_GETOWN: ::c_int = 9;
328+
pub const F_GETLK: ::c_int = 12;
329+
pub const F_SETLK: ::c_int = 13;
330+
pub const F_SETLKW: ::c_int = 14;
329331
pub const SFD_NONBLOCK: ::c_int = 2048;
330332
pub const TCSANOW: ::c_int = 0;
331333
pub const TCSADRAIN: ::c_int = 1;
@@ -353,6 +355,7 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
353355
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
354356
pub const O_DIRECT: ::c_int = 16384;
355357
pub const O_DIRECTORY: ::c_int = 65536;
358+
pub const O_LARGEFILE: ::c_int = 0o0100000;
356359
pub const O_NOFOLLOW: ::c_int = 131072;
357360
pub const MAP_HUGETLB: ::c_int = 262144;
358361
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
@@ -301,8 +301,6 @@ pub const O_SYNC: ::c_int = 1052672;
301301
pub const O_RSYNC: ::c_int = 1052672;
302302
pub const O_DSYNC: ::c_int = 4096;
303303

304-
pub const SOCK_NONBLOCK: ::c_int = 2048;
305-
306304
pub const MAP_ANON: ::c_int = 0x0020;
307305
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
308306
pub const MAP_DENYWRITE: ::c_int = 0x0800;
@@ -316,7 +314,6 @@ pub const MAP_SYNC: ::c_int = 0x080000;
316314

317315
pub const SOCK_STREAM: ::c_int = 1;
318316
pub const SOCK_DGRAM: ::c_int = 2;
319-
pub const SOCK_SEQPACKET: ::c_int = 5;
320317

321318
pub const EDEADLK: ::c_int = 35;
322319
pub const ENAMETOOLONG: ::c_int = 36;
@@ -442,9 +439,6 @@ pub const F_GETOWN: ::c_int = 9;
442439
pub const F_SETLK: ::c_int = 13;
443440
pub const F_SETLKW: ::c_int = 14;
444441
pub const F_SETOWN: ::c_int = 8;
445-
pub const F_OFD_GETLK: ::c_int = 36;
446-
pub const F_OFD_SETLK: ::c_int = 37;
447-
pub const F_OFD_SETLKW: ::c_int = 38;
448442

449443
pub const VEOF: usize = 4;
450444
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/b64/powerpc64.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ pub const F_GETOWN: ::c_int = 9;
212212
pub const F_SETLK: ::c_int = 6;
213213
pub const F_SETLKW: ::c_int = 7;
214214
pub const F_SETOWN: ::c_int = 8;
215-
pub const F_OFD_GETLK: ::c_int = 36;
216-
pub const F_OFD_SETLK: ::c_int = 37;
217-
pub const F_OFD_SETLKW: ::c_int = 38;
218215

219216
pub const VEOF: usize = 4;
220217

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,9 +604,6 @@ pub const F_GETOWN: ::c_int = 9;
604604
pub const F_SETLK: ::c_int = 6;
605605
pub const F_SETLKW: ::c_int = 7;
606606
pub const F_SETOWN: ::c_int = 8;
607-
pub const F_OFD_GETLK: ::c_int = 36;
608-
pub const F_OFD_SETLK: ::c_int = 37;
609-
pub const F_OFD_SETLKW: ::c_int = 38;
610607

611608
pub const VEOF: usize = 4;
612609

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,6 @@ pub const F_GETOWN: ::c_int = 9;
297297
pub const F_SETOWN: ::c_int = 8;
298298
pub const F_SETLK: ::c_int = 6;
299299
pub const F_SETLKW: ::c_int = 7;
300-
pub const F_OFD_GETLK: ::c_int = 36;
301-
pub const F_OFD_SETLK: ::c_int = 37;
302-
pub const F_OFD_SETLKW: ::c_int = 38;
303300

304301
pub const VTIME: usize = 5;
305302
pub const VSWTC: usize = 7;

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,9 +805,6 @@ pub const F_GETOWN: ::c_int = 9;
805805
pub const F_SETLK: ::c_int = 6;
806806
pub const F_SETLKW: ::c_int = 7;
807807
pub const F_SETOWN: ::c_int = 8;
808-
pub const F_OFD_GETLK: ::c_int = 36;
809-
pub const F_OFD_SETLK: ::c_int = 37;
810-
pub const F_OFD_SETLKW: ::c_int = 38;
811808

812809
pub const VEOF: usize = 4;
813810

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ pub const ECOMM: ::c_int = 70;
512512
pub const EPROTO: ::c_int = 71;
513513
pub const EDOTDOT: ::c_int = 73;
514514

515+
pub const F_OFD_GETLK: ::c_int = 36;
516+
pub const F_OFD_SETLK: ::c_int = 37;
517+
pub const F_OFD_SETLKW: ::c_int = 38;
518+
515519
pub const F_RDLCK: ::c_int = 0;
516520
pub const F_WRLCK: ::c_int = 1;
517521
pub const F_UNLCK: ::c_int = 2;
@@ -541,7 +545,9 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4;
541545

542546
pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
543547

548+
pub const SOCK_SEQPACKET: ::c_int = 5;
544549
pub const SOCK_DCCP: ::c_int = 6;
550+
pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
545551
pub const SOCK_PACKET: ::c_int = 10;
546552

547553
pub const SOMAXCONN: ::c_int = 128;

0 commit comments

Comments
 (0)