FreeBSD build fix, v4.

Authored by mpyne on Jul 22 2017, 6:31 PM.

Description

FreeBSD build fix, v4.

libcs like musl essentially only expose defines/symbols present in ISO C
by default, and require use of defines to expose symbols in POSIX, SUS,
X/Open, etc. But, systems like FreeBSD instead define nearly everything
by default and then *remove* definitions if you use feature test macros.

This means we can't use symbols like O_NDELAY (a BSD extension which
FreeBSD removes in X/Open mode) or INADDR_LOOPBACK (not in C or POSIX
for some reason), and need to use a looser include to expose
gettimeofday (present in X/Open but not in POSIX).

As always, tested on glibc and musl but I'll have to wait for CI for
FreeBSD.

Details

Committed
mpyneJul 22 2017, 6:35 PM
Parents
R106:5bef0ecaa071: FreeBSD compile fix, try 3.
Branches
Unknown
Tags
Unknown