From owner-freebsd-questions Mon Aug 27 1: 9:52 2001 Delivered-To: freebsd-questions@freebsd.org Received: from clientmail.realtime.co.uk (simian.ehsrealtime.com [213.52.146.137]) by hub.freebsd.org (Postfix) with ESMTP id 78CA437B406 for ; Mon, 27 Aug 2001 01:09:47 -0700 (PDT) (envelope-from wayne.pascoe@ehsrealtime.com) Received: from pan.ehsrealtime.com ([213.52.146.196]) by clientmail.realtime.co.uk with esmtp (Exim 3.20 #1) id 15bHRv-0004Bg-01 for freebsd-questions@freebsd.org; Mon, 27 Aug 2001 09:08:47 +0100 Received: from waynep by pan.ehsrealtime.com with local (Exim 3.22 #1) id 15bHRv-0005a6-00 for freebsd-questions@freebsd.org; Mon, 27 Aug 2001 09:08:47 +0100 From: Wayne Pascoe To: freebsd-questions@freebsd.org Subject: OT: Re: Porting app from Linux - sys/vfs.h replacement References: <861ylycyf7.fsf@pan.ehsrealtime.com> <20010826162454.A12725@dan.emsphone.com> Reply-To: wayne.pascoe@ehsrealtime.com Date: 27 Aug 2001 09:08:47 +0100 In-Reply-To: <20010826162454.A12725@dan.emsphone.com> Message-ID: <86n14lj568.fsf_-_@pan.ehsrealtime.com> Lines: 67 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dan Nelson writes: > > What would provide the same functionality in FreeBSD ? I particularly > > need > > > > buf.f_blocks > > buf.f_bavail > > buf.f_bfree > > man statfs: > > SYNOPSIS > #include > #include Thanks... I have replaced #include with #include #include Now when trying to build the program, I get the following error : gcc -g -g3 -O2 spacewatcher.c -o spacewatcher In file included from /usr/include/sys/mount.h:40, from spacewatcher.c:13: /usr/include/sys/ucred.h:47: syntax error before `u_short' /usr/include/sys/ucred.h:50: syntax error before `gid_t' spacewatcher.c: In function `build_alert': spacewatcher.c:112: warning: initialization makes pointer from integer without a cast *** Error code 1 It loks like it doesn't like u_short and gid_t ... The section from ucred.h is as follows : struct ucred { u_short cr_ref; /* reference count */ uid_t cr_uid; /* effective user id */ short cr_ngroups; /* number of groups */ gid_t cr_groups[NGROUPS]; /* groups */ struct uidinfo *cr_uidinfo; /* per uid resource consumption */ }; I have written a mostly empty c file called test.c that just looks like #include #include #include void main (void) { } It still produces the same error. Is there another header file I need to include for this to work ? Thanks in advance ... -- Wayne Pascoe Phone : +44 (0) 20 7017 1221 Things fall apart; the center cannot hold; Mere anarchy is loosed upon the world. - Yeats To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message