From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7768 invoked by alias); 29 Apr 2004 19:40:11 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 7752 invoked from network); 29 Apr 2004 19:40:09 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sources.redhat.com with SMTP; 29 Apr 2004 19:40:09 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i3THS53j010994; Thu, 29 Apr 2004 19:28:05 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i3THS5ee010979; Thu, 29 Apr 2004 19:28:05 +0200 Date: Thu, 29 Apr 2004 19:40:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix ([BZ #140]) Message-ID: <20040429172804.GV5191@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-04/txt/msg00097.txt.bz2 Hi! Without the following patch #include #include int main (void) { struct sysinfo si; sysinfo (&si); return 0; } will not compile. 2004-04-29 Jakub Jelinek [BZ #140] * sysdeps/unix/sysv/linux/sys/sysctl.h: Remove linux/compiler.h include. (_LINUX_KERNEL_H, _LINUX_TYPES_H, _LINUX_LIST_H): Only define if not yet defined, #undef back after including linux/sysctl.h if defined here. (__LINUX_COMPILER_H, __user): Define if not yet defined, #undef back after including linux/sysctl.h if defined here. --- libc/sysdeps/unix/sysv/linux/sys/sysctl.h.jj 2003-07-30 12:00:52.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/sys/sysctl.h 2004-04-29 21:26:10.088848633 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1999, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1999, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,14 +23,44 @@ #define __need_size_t #include /* Prevent more kernel headers than necessary to be included. */ -#define _LINUX_KERNEL_H 1 -#define _LINUX_TYPES_H 1 -#define _LINUX_LIST_H 1 -/* We do need this one for the declarations in , - since we've elided the inclusion of that gets them. */ -#include +#ifndef _LINUX_KERNEL_H +# define _LINUX_KERNEL_H 1 +# define __undef_LINUX_KERNEL_H +#endif +#ifndef _LINUX_TYPES_H +# define _LINUX_TYPES_H 1 +# define __undef_LINUX_TYPES_H +#endif +#ifndef _LINUX_LIST_H +# define _LINUX_LIST_H 1 +# define __undef_LINUX_LIST_H +#endif +#ifndef __LINUX_COMPILER_H +# define __LINUX_COMPILER_H 1 +# define __user +# define __undef__LINUX_COMPILER_H +#endif + #include +#ifdef __undef_LINUX_KERNEL_H +# undef _LINUX_KERNEL_H +# undef __undef_LINUX_KERNEL_H +#endif +#ifdef __undef_LINUX_TYPES_H +# undef _LINUX_TYPES_H +# undef __undef_LINUX_TYPES_H +#endif +#ifdef __undef_LINUX_LIST_H +# undef _LINUX_LIST_H +# undef __undef_LINUX_LIST_H +#endif +#ifdef __undef__LINUX_COMPILER_H +# undef __LINUX_COMPILER_H +# undef __user +# undef __undef__LINUX_COMPILER_H +#endif + __BEGIN_DECLS /* Read or write system parameters. */ Jakub