Auto merge of #2461 - rtzoeller:dfly_headers, r=JohnTitor
Auto merge of #2461 - rtzoeller:dfly_headers, r=JohnTitor

Fix most libc-test compile warnings and errors for DragonFly

libc-test is failing on my DragonFly BSD system with a large number of errors, most of which are just a result of headers not being included.

```
[root@ ~/libc/libc-test]# uname -a
DragonFly  6.0-RELEASE DragonFly v6.0.1-RELEASE #0: Wed Oct 13 21:06:17 CDT 2021     root@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

[root@ ~/libc/libc-test]# cargo test 2>&1 >/dev/null | wc -l
    6015
```

Including a few additional headers, most of these warnings and errors are fixed:
```
[root@ ~/libc/libc-test]# cargo test 2>&1 >/dev/null | wc -l
    561
```

rust-lang/libc,rust-lang/libc,rust-lang/libc