compilation problems with some code from Linux

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Dec 8 10:08:17 PST 2006


On 2006-12-08 10:21, Andrew Falanga <af300wsm at gmail.com> wrote:
> Hi,
>
> 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?

Since these interfaces are not available in FreeBSD, and they are
Linux-specific, you have to find out *why* they are used and look
for equivalent functionality in FreeBSD -- provided there *is*
something equivalent, of course.

- Giorgos



More information about the freebsd-questions mailing list