Commit 8c650abc authored by Michael Pyne's avatar Michael Pyne

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).
parent 6db11670
......@@ -35,7 +35,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment