Commit graph

5559 commits

Author SHA1 Message Date
Jonah Petri 0fcf5b32c5 uclibc: fix O_TMPFILE value, un-pub some unused fields to fix libc-test 2022-01-19 15:26:14 -05:00
bors 6987bba752 Auto merge of #2634 - skrap:master, r=Amanieu
uclibc: Don't specialize PTRACE_O_MASK for uclibc

This constant comes from the kernel headers, so its value should not depend on the libc type.

To test: see instructions in https://github.com/rust-lang/libc/pull/2566
2022-01-19 18:43:46 +00:00
Thomas de Zeeuw 178147edf9 Release v0.2.113 2022-01-19 19:35:23 +01:00
Jonah Petri c4d87be1de uclibc: PTRACE_O_MASK comes from the kernel, not from libc, so don't specialize it for uclibc 2022-01-19 09:33:25 -05:00
bors 3b15a77cdf Auto merge of #2615 - lancethepants:TIOCGWINSZ, r=Amanieu
define TIOCGWINSZ as c_ulong under arm-uclibc.

I'm trying to bring up a new target for rust, `armv7-unknown-linux-uclibceabi (softfloat)`. https://github.com/rust-lang/rust/pull/92383 Looks like a lot of work has already been hashed out from the recent addition of `armv7-unknown-linux-uclibceabihf`. The only issue I'm currently seeing is when I encounter `TIOCGWINSZ` in a couple places. This is the error I see.
```
   Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1)
error[E0277]: the trait bound `u32: From<i32>` is not satisfied
  --> src/platform/unix.rs:12:43
   |
12 |     let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window);
   |                      -----                ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32`
   |                      |
   |                      required by a bound introduced by this call
   |
   = help: the following implementations were found:
             <u32 as From<Ipv4Addr>>
             <u32 as From<NonZeroU32>>
             <u32 as From<bool>>
             <u32 as From<char>>
           and 2 others
   = note: required because of the requirements on the impl of `Into<u32>` for `i32`

error[E0277]: the trait bound `u32: From<i32>` is not satisfied
```
I see the error in the `termize` crate, and also `shell.rs` in the cargo source.

My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc.

I don't want to break anything with the established `armv7-unknown-linux-uclibceabihf` target so perhaps `@skrap` could chime in and take a look. Maybe a better solutions exists.
2022-01-18 19:21:00 +00:00
lancethepants dc36824353 Undefine FIOASYNC for sparc64. 2022-01-18 08:09:55 -07:00
bors 8cba30b000 Auto merge of #2625 - tamird:ip_mreqn, r=Amanieu
Add `ip_mreqn` on more platforms

See individual commits; please do not squash on merge. `@Thomasdezeeuw`
2022-01-17 15:55:09 +00:00
Tamir Duberstein 037d7415a7
Add ip_mreqn on Android
This was added to Android's libc (bionic) in 2013. See
655a7c081f.
2022-01-17 15:39:52 +00:00
Tamir Duberstein 3bbc552727
Add ip_mreqn on FreeBSD
This was added in FreeBSD 13.0.0. See
https://github.com/freebsd/freebsd-src/commit/0dfc145a.
2022-01-17 15:37:50 +00:00
Tamir Duberstein 6fbe3b78f1
Add ip_mreqn on Apple platforms
Available since macOS 10.7. See
https://developer.apple.com/documentation/kernel/ip_mreqn.
2022-01-17 14:05:15 +00:00
lancethepants 33842946b6 Consolidate all Ioctl constants and functions by architecture. 2022-01-17 00:45:24 -07:00
bors df679e8075 Auto merge of #2631 - devnexen:fbsd13_upd_shm, r=Amanieu
shm api update from FreeBSD 13
2022-01-17 03:06:28 +00:00
bors f0ba214ebb Auto merge of #2630 - kaniini:chore/s390x-musl-fixes, r=Amanieu
Fix definitions for the s390x-musl target.

When I was creating the original s390x musl definitions, I copied a little too closely from glibc for the ioctl(2) constants.  This was then exacerbated in c7c238d812 with the creation of an erroneous definition.
2022-01-17 02:00:08 +00:00
bors 5617b46596 Auto merge of #2629 - devnexen:apple_execinfo_upd, r=Amanieu
macOs update backtrace api.
2022-01-17 00:58:07 +00:00
bors e469fc25f7 Auto merge of #2628 - devnexen:netbsd_prot_mprotect, r=Amanieu
netbsd add PROT_MPROTECT macros.
2022-01-16 23:33:36 +00:00
bors 805321e233 Auto merge of #2626 - Mek101:master, r=Amanieu
Add android ioctl constansts: BLKSSZGET and BLKPBSZGET

Adds the linux ioctl constants to android
2022-01-16 22:29:09 +00:00
David CARLIER 0a57541a71 shm api update from FreeBSD 13 2022-01-16 09:00:40 +00:00
Ariadne Conill ecb5345b19 Fix definitions of FIONBIO/FIONCLEX/FIOCLEX constants on s390x-musl.
On musl, these constants must be ints, not ulongs.  On glibc, they are
ulong, and as such, were erroneously included as ulongs in the initial
s390x-musl definitions.
2022-01-16 04:08:21 +00:00
Ariadne Conill 23a3e1f293 Fix ioctl definition on s390x-musl targets.
ioctl(2) always takes an int as the request, not a ulong, on musl.
I copied a little too closely from the glibc definitions when creating
the original s390x-musl ones.
2022-01-16 04:05:33 +00:00
David CARLIER 6cce830b96 macOs update backtrace api. 2022-01-15 11:59:06 +00:00
David Carlier 5d9ec7b499 netbsd add PROT_MPROTECT macros. 2022-01-15 06:41:37 +00:00
Mek101 9c55170044 Add android ioctl constansts: BLKSSZGET and BLKPBSZGET 2022-01-13 21:17:32 +01:00
bors e470e3b6a1 Auto merge of #2624 - rtzoeller:umount_nofollow, r=Amanieu
Define UMOUNT_NOFOLLOW on Linux-like platforms

Requested-by: https://github.com/nix-rust/nix/issues/1631
2022-01-13 13:00:48 +00:00
Ryan Zoeller 4b462354e1 Define UMOUNT_NOFOLLOW on Linux-like platforms 2022-01-12 21:34:49 -06:00
bors 26b68f834c Auto merge of #2622 - devnexen:fuse_super_magic, r=Amanieu
linux GLIBC add FUSE_SUPER_MAGIC

close #2621
2022-01-12 17:07:42 +00:00
bors c1ffba4263 Auto merge of #2620 - rtzoeller:android_posix_vdisable, r=Amanieu
Android defines _POSIX_VDISABLE

c44b1d0676/libc/include/bits/posix_limits.h (L95)
2022-01-12 16:03:36 +00:00
David Carlier fc9854f0d3 linux GLIBC add FUSE_SUPER_MAGIC
close #2621
2022-01-12 15:19:59 +00:00
Ryan Zoeller e6bd49cf31 Android defines _POSIX_VDISABLE 2022-01-10 22:43:43 -06:00
bors c1b386055f Auto merge of #2617 - devnexen:fbsd14_cpuset_upd, r=Amanieu
freebsd add CPU_COUNT macro
2022-01-09 00:39:21 +00:00
bors 847f7174ef Auto merge of #2618 - devnexen:linux_gnu_malloc_trim, r=Amanieu
linux GLIBC add malloc_trim fn.
2022-01-08 19:04:09 +00:00
David Carlier 95e74dd173 linux GLIBC add malloc_trim fn. 2022-01-08 15:54:31 +00:00
David CARLIER 21aadd4142 freebsd add CPU_COUNT macro 2022-01-06 20:45:14 +00:00
bors 1f1ebd5b80 Auto merge of #2616 - nanpuyue:fix-freebsd-ttycom, r=Amanieu
fix(freebsd): incorrect constant type from ttycom.h

ref: https://github.com/rust-lang/libc/pull/493

the value and type of the constant are obtained by executing the following script

ttycom.sh:
```
#/bin/sh

cat <<EOF
#include <stdio.h>
#include <sys/ttycom.h>
#include <sys/time.h>
#include <termios.h>

void main() {
EOF

grep -o TIOC[A-Z_]* /usr/include/sys/ttycom.h | sort -u |\
 xargs -I{} echo '    printf("pub const {}: u%lu = 0x%lx;\n", sizeof({})*8, {});'

echo '}'
```

```
./ttycom.sh > main.c
clang main.c
./a.out
```
2022-01-05 23:35:48 +00:00
南浦月 d35e9ea2ad fix(freebsd): incorrect constant type from ttycom.h 2022-01-06 03:32:25 +08:00
bors cc186d743b Auto merge of #2609 - devnexen:solarish_sol_filter, r=Amanieu
illumos SOL_FILTER socket option.
2022-01-04 23:48:18 +00:00
David Carlier 2c2f0715f7 illumos SOL_FILTER socket option. 2022-01-04 17:48:57 +00:00
bors 2910a5383a Auto merge of #2613 - djc:macos-dontfrag, r=Amanieu
apple IP{,V6}_DONTFRAG constants

These are new in macOS Big Sur, but I'm not sure if we're supposed to have any `cfg` incantations that can restrict to that version (I reviewed `cfg` instances in both `apple` and `linux_like` but didn't see anything like that).
2022-01-04 05:33:33 +00:00
bors 7b415abba1 Auto merge of #2612 - bsiegert:master, r=Amanieu
NetBSD: add definition for execvpe

This is exactly the same as the OpenBSD definition. NetBSD has had
execvpe since the beginning, AFAICS.
2022-01-04 04:27:56 +00:00
bors 484570d766 Auto merge of #2611 - devnexen:dfbsd_so_acceptfilter, r=Amanieu
dragonflybsd accept_filter_arg support for SO_ACCEPTFILTER.
2022-01-04 03:25:19 +00:00
bors f51fd85a81 Auto merge of #2610 - rtzoeller:dfly_cmsg_align, r=Amanieu
Fix _CMSG_ALIGN on DragonFly

Based on the following DragonFly source:
- f6a0403337/sys/sys/socket.h (L480)
- f6a0403337/sys/cpu/x86_64/include/alignbytes.h (L35)

This fixes nix's failing scm tests on DragonFly.
2022-01-04 02:17:46 +00:00
bors 3c1eef02f0 Auto merge of #2608 - devnexen:obsd_splice, r=Amanieu
openbsd adding splice struct for SO_SPLICE sock opt
2022-01-04 00:10:11 +00:00
bors 4c7c33760c Auto merge of #2606 - devnexen:ptrace_get_syscall_info_linux_gnu, r=Amanieu
linux add ptrace_syscall_info ptrace query.

closes #1920
2022-01-03 23:05:40 +00:00
David Carlier 1dd86b2d91 linux add ptrace_syscall_info ptrace query.
closes #1920
2022-01-03 20:14:31 +00:00
bors fd48bbbf84 Auto merge of #2604 - devnexen:dolarish_update_further, r=Amanieu
solarish couple of strings fn.
2022-01-03 19:30:21 +00:00
Ryan Zoeller 67464ff7d9 Fix _CMSG_ALIGN on DragonFly 2022-01-02 13:57:14 -06:00
Dirkjan Ochtman 757b5dd7c7 apple IP{,V6}_DONTFRAG constants 2022-01-01 22:28:42 +01:00
Benny Siegert a1a24cd01f NetBSD: add definition for execvpe
This is exactly the same as the OpenBSD definition. NetBSD has had
execvpe since the beginning, AFAICS.
2022-01-01 19:17:50 +00:00
David Carlier fbadd6310b dragonflybsd accept_filter_arg support for SO_ACCEPTFILTER. 2021-12-31 22:16:23 +00:00
David Carlier 372c051029 openbsd adding splice struct for SO_SPLICE sock opt 2021-12-30 10:23:26 +00:00
bors 52382d65fb Auto merge of #2569 - devnexen:linux_ptrace_peeksiginfo_args, r=Amanieu
linux/android add ptracec_peeksiginfo_args struct.
2021-12-29 20:15:40 +00:00