Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2006 20:07:11 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Andrew Falanga <af300wsm@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: compilation problems with some code from Linux
Message-ID:  <20061208180710.GB19105@kobe.laptop>
In-Reply-To: <340a29540612080921i7d202e4dn7f8378c5341aeca2@mail.gmail.com>
References:  <340a29540612080921i7d202e4dn7f8378c5341aeca2@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-12-08 10:21, Andrew Falanga <af300wsm@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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061208180710.GB19105>