I'll likely split this up into multiple commits, but each one is small
enough that I think it's best in a single review.
openssl: use getrandom(2) instead of probing for getentropy(2) The probing for getentropy(2) relies on re-declaring getentropy(2) as weak and checking the address, but this is incompatible with the _FORTIFY_SOURCE symbol renaming scheme. It's always present on all supported FreeBSD versions now so we could cut it down to unconditional use, but there's another segment for getrandom(2) already that's cleaner to just add us to. We should upstream this.
- include: ssp: fix the build with earlier C standards
inline isn't always a keyword, so we should be using __ssp_inline as we do everywhere else in the _FORTIFY_SOURCE support. Variable declarations in a loop initializer are also not always supported, so declare any loop vars in advance.
- include: ssp: don't shadow the mempcpy builtin
GCC emits a warning about shadowing a builtin with our mempcpy declaration, so switch it to using the same model as memcpy() and use the apparently-existing builtin_mempcpy_chk().
- libc: undefine _FORTIFY_SOURCE for fortified interpose stubs
GCC doesn't like #pragma weak macro(foo)- there's nothing of value to fortify in these files anyways, so just turn it off individually to fix the build.
- sys/select.h: const'ify the fd_set that __fdset_idx() takes
Some callers may be operating on a const fd_set and we don't particularly care, so const'ify it.
- bsnmpd: FreeBSD has strlcpy(3)
Fixes the fortified build with GCC