Fix FreeBSD build, try 2.

Authored by mpyne on Jul 19 2017, 8:45 PM.

Description

Fix FreeBSD build, try 2.

The last commit to fix FreeBSD build kept things moving along, but hit a
separate set of errors, starting with

19:40:54 In file included from .../ksysguardd/ksysguardd.c:38:
19:40:54 /usr/include/sys/file.h:221:2: error: unknown type name 'u_int'
19:40:54         u_int   xf_flag;        /* flags (see fcntl.h) */
19:40:54         ^

The problem here appears to be that the sys/file.h header is an internal
BSD header, not meant for use by portable apps. See
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=156637 -- I was also
unable to find a POSIX or SUS requirement for sys/file.h; instead we
need to use things like fcntl.h (which is already included).

Since sys/file.h is not needed for the symbols we use in ksysguard.c,
I'm removing entirely, which should fix the build (the other errors
should be compiler confusion, I've traced through the FreeBSD includes
to verify that symbols like gettimeofday and O_NDELAY are available even
with the _POSIX_C_SOURCE define).

Details

Committed
mpyneJul 19 2017, 9:28 PM
Parents
R106:6db11670e942: Fix build regression on FreeBSD
Branches
Unknown
Tags
Unknown