From owner-freebsd-questions@FreeBSD.ORG Fri Dec 8 18:08:17 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1994C16A40F for ; Fri, 8 Dec 2006 18:08:17 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6584443CA6 for ; Fri, 8 Dec 2006 18:07:06 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id kB8I7KZu025927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 8 Dec 2006 20:07:27 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kB8I7DS1019257; Fri, 8 Dec 2006 20:07:13 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kB8I7BJr019256; Fri, 8 Dec 2006 20:07:11 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 8 Dec 2006 20:07:11 +0200 From: Giorgos Keramidas To: Andrew Falanga Message-ID: <20061208180710.GB19105@kobe.laptop> References: <340a29540612080921i7d202e4dn7f8378c5341aeca2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <340a29540612080921i7d202e4dn7f8378c5341aeca2@mail.gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.447, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.75, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions Subject: Re: compilation problems with some code from Linux X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2006 18:08:17 -0000 On 2006-12-08 10:21, Andrew Falanga 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 > > 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 > 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