From owner-freebsd-current@FreeBSD.ORG Tue Jan 1 19:46:48 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 166E816A41B for ; Tue, 1 Jan 2008 19:46:48 +0000 (UTC) (envelope-from roy@marples.name) Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by mx1.freebsd.org (Postfix) with ESMTP id C3C2013C4D1 for ; Tue, 1 Jan 2008 19:46:47 +0000 (UTC) (envelope-from roy@marples.name) Received: from [10.73.1.31] (uberlaptop.marples.name [10.73.1.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id A57741900DE for ; Tue, 1 Jan 2008 19:46:16 +0000 (GMT) From: Roy Marples To: freebsd-current@freebsd.org Content-Type: text/plain Date: Tue, 01 Jan 2008 19:46:16 +0000 Message-Id: <1199216776.25213.10.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: #define _XOPEN_SOURCE breaks userland applications X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 19:46:48 -0000 Hi Consider the following #define _XOPEN_SOURCE 600 #include int main(void) { return 0; } Gives the following when compiled > gcc x.c In file included from x.c:2: /usr/include/sys/file.h:162: error: expected specifier-qualifier-list before 'u_int' The error was caused by this patch http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/types.h.diff?r1=1.73;r2=1.74;f=h No CVS comment as to why the change was needed I propose that the first part of the patch is reverted, as follows Thanks Roy --- src/sys/sys/types.h 2008-01-01 18:52:26.000000000 +0000 +++ src.orig/sys/sys/types.h 2008-01-01 19:20:21.000000000 +0000 @@ -46,7 +46,7 @@ #include -#if __BSD_VISIBLE +#ifndef _POSIX_SOURCE typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int;