From owner-freebsd-bugs@FreeBSD.ORG Mon Apr 25 16:09:31 2011 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 285011065674; Mon, 25 Apr 2011 16:09:31 +0000 (UTC) (envelope-from streambag@streambag.se) Received: from smtprelay-h21.telenor.se (smtprelay-h21.telenor.se [195.54.99.196]) by mx1.freebsd.org (Postfix) with ESMTP id D905D8FC0C; Mon, 25 Apr 2011 16:09:30 +0000 (UTC) Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-h21.telenor.se (Postfix) with ESMTP id A62CDEA06B; Mon, 25 Apr 2011 17:45:00 +0200 (CEST) X-SENDER-IP: [85.229.128.83] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnlYAPOVtU1V5YBTPGdsb2JhbACJGJwcCwEBAQE3MohwuTOFdgSVEw X-IronPort-AV: E=Sophos;i="4.64,265,1301868000"; d="scan'208";a="182667748" Received: from c-5380e555.08-58-6c6b7013.cust.bredbandsbolaget.se (HELO localhost) ([85.229.128.83]) by ipb2.telenor.se with ESMTP; 25 Apr 2011 17:45:00 +0200 Date: Mon, 25 Apr 2011 17:44:31 +0200 From: Robert Andersson To: Bruce Evans Message-ID: <20110425174431.4ee69878@streambag.se> In-Reply-To: <20110425190527.K3464@besplex.bde.org> References: <201104250815.p3P8FoLj030509@red.freebsd.org> <20110425190527.K3464@besplex.bde.org> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@freebsd.org, freebsd-gnats-submit@freebsd.org Subject: Re: misc/156637: sys/types.h can't be included when _XOPEN_SOURCE is defined X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 16:09:31 -0000 On Mon, 25 Apr 2011 19:10:00 +1000 (EST) Bruce Evans wrote: > > I've used the following fix (the first of the above) for 10 years or > so (it got lost in fixes for mounds of style bugs in ). > I didn't notice it in connection with _XOPEN_SOURCE, but by general > principles. > > % Index: file.h > % =================================================================== > % RCS file: /home/ncvs/src/sys/sys/file.h,v > % retrieving revision 1.65 > % diff -u -2 -r1.65 file.h > % --- file.h 19 Jun 2004 11:38:00 -0000 1.65 > % +++ file.h 20 Jun 2004 02:11:04 -0000 > % @@ -151,5 +142,5 @@ > % void *xf_data; /* file descriptor specific > data */ % void *xf_vnode; /* vnode pointer */ > % - u_int xf_flag; /* flags (see fcntl.h) */ > % + unsigned xf_flag; /* flags (see fcntl.h) */ > % }; > % > > Bruce > Hi, Thanks for responding! Your patch definitely solves the problem. I found this when trying to port an application to FreeBSD. I guess I can work around the problem by patching the code using file.h to define __BSD_VISIBLE, but it would be great if this fix could be committed so that the workaround can be removed eventually. Cheers, Robert