memfd_create is a glibc API, which is not present on uclibc
I think the title says it all! The `armv7-unknown-linux-uclibceabihf` tier-3 target does not build without this change, and I suspect all other uclibc builds are broken as well.
It's a good reminder to try to add some CI validation of the uclibc build, which I will try to do in a followup PR.
To test this, get and unpack https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2020.08-1.tar.bz2
Note instances of `PATH_HERE` below which you'll have to customize for your system.
config.toml:
```
[target.armv7-unknown-linux-uclibceabihf]
linker = "/PATH_HERE/buildroot-armv7/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gcc"
runner = "qemu-arm -L /PATH_HERE/armv7-eabihf--uclibc--bleeding-edge-2020.08-1/arm-buildroot-linux-uclibcgnueabihf/sysroot/"
```
Then run:
```
cd libc-test
CC_armv7_unknown_linux_uclibceabihf=/PATH_HERE/armv7-eabihf--uclibc--bleeding-edge-2020.08-1/bin/arm-buildroot-linux-uclibcgnueabihf-gcc cargo +nightly test -Zbuild-std --target armv7-unknown-linux-uclibceabihf
```
(if there's a way to include that `CC_armv7_etc` cross CC in the config.toml, I'm all ears!)
Use libc specific type for architecture specific ioctl defines on Linux.
This PR should fix the type change of some ioctl constants on Linux introduced by #2530.
It does this by adding a `#[doc(hidden)]` type called `Ioctl`, which is defined in libc specific modules and used in arch specific modules.
However, when doing this I noticed that when I added `TCGETS2`, `TCSETS2`, ... in #2508, I unconditionally used `c_ulong`. This is inconsistent with the other ioctl constants for `musl` and `uclibc`. This PR also changes those to use the libc specific types. However, PR #2508 has already been released in 0.2.107, so technically that is also a semver incompatible change. The impact is limited to new constants introduced in the last release, and only on `musl` and `uclibc` targets.
So what is more important here? Consistency in the type of ioctl constants, or being very strict with backwards compatibility? If it is the latter, I'll revert `TCGETS2` etc to `c_ulong` for this PR.