Skip to content
  • Michael Pyne's avatar
    Fix FreeBSD build, try 2. · 8c650abc
    Michael Pyne authored
    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).
    8c650abc