compilation problems with some code from Linux

Andrew Falanga af300wsm at
Fri Dec 8 09:25:16 PST 2006


I'm trying to port some code from Linux to FreeBSD and I've got an issue
that revolves around something I've never dealt with before.  The code
includes the following header:

#include <sys/ucred.h>

Apparently, program is attempting to make use of the xucred structure
defined in there, because the rest of the stuff in the file seems to be for
the kernel.  However, when I try to compile, gcc continually bails with the
following error (among others), "NGROUPS was not declared in this scope."
The NGROUPS appears to be a macro, but it's not defined earlier on.  Would
anyone here know where it's defined so I can include that file too?

Secondly, I'm also getting errors because gcc can't find <sys/vfs.h>
either.  True enough, there isn't any vfs.h file in /usr/include/sys.  Since
this file is in Linux, what should I include for FreeBSD?


More information about the freebsd-questions mailing list