Bug 650

Summary: Building various packages with latest snapshot glibc-20050110 fails.
Product: glibc Reporter: Han Boetes <han>
Component: libcAssignee: Ulrich Drepper <drepper.fsp>
Status: RESOLVED FIXED    
Severity: normal CC: glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: 2.3.4   
Target Milestone: ---   
Host: i686-pc-linux-gnu Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu Last reconfirmed:
Project(s) to access: ssh public key:
Bug Depends on:    
Bug Blocks: 724    

Description Han Boetes 2005-01-11 20:16:49 UTC
For example alsa-lib-1.0.7

 gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -Os -march=i686
-pipe -fstack-protector -MT seq_midi_event.lo -MD -MP -MF
.deps/seq_midi_event.Tpo -c seq_midi_event.c  -fPIC -DPIC -o .libs/seq_midi_event.o
In file included from seq_midi_event.c:31:
/usr/include/malloc.h:121: error: parse error before "__wur"
/usr/include/malloc.h:125: error: parse error before "__wur"
/usr/include/malloc.h:131: error: parse error before
"__attribute_warn_unused_result__"
/usr/include/malloc.h:141: error: parse error before "__wur"
/usr/include/malloc.h:145: error: parse error before "__wur"
/usr/include/malloc.h:150: error: parse error before "__wur"
make[2]: *** [seq_midi_event.lo] Error 1
make[2]: Leaving directory `/mega/pkgmk/work/alsa-lib/src/alsa-lib-1.0.7/src/seq'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mega/pkgmk/work/alsa-lib/src/alsa-lib-1.0.7/src'
make: *** [all-recursive] Error 1

But also libavi-file, sysfsutils and udev fail reporting about a parse error
before "__wur" in malloc.h

Same happens with CFLAGS unset.
Comment 1 GOTO Masanori 2005-01-12 01:21:21 UTC
Correct.  This patch should fix this problem.

2005-01-12  GOTO Masanori  <gotom@debian.or.jp>

        [BZ #650]
        * malloc/malloc.h: Always include features.h.

Index: malloc/malloc.h
===================================================================
RCS file: /cvs/glibc/libc/malloc/malloc.h,v
retrieving revision 1.27
diff -u -r1.27 malloc.h
--- malloc/malloc.h     7 Jan 2005 19:41:24 -0000       1.27
+++ malloc/malloc.h     12 Jan 2005 01:05:53 -0000
@@ -20,9 +20,7 @@
 #ifndef _MALLOC_H
 #define _MALLOC_H 1

-#ifdef _LIBC
 #include <features.h>
-#endif

 /*
   $Id: malloc.h,v 1.27 2005/01/07 19:41:24 drepper Exp $
Comment 2 Han Boetes 2005-01-12 02:13:16 UTC
Yes indeed, that fixes the problem.
Comment 3 GOTO Masanori 2005-01-13 02:01:08 UTC
In CVS fixed.
Comment 4 Sourceware Commits 2005-02-16 10:16:25 UTC
Subject: Bug 650

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_3-branch
Changes by:	roland@sources.redhat.com	2005-02-16 10:16:11

Modified files:
	malloc         : malloc.h 

Log message:
	2005-01-12  GOTO Masanori  <gotom@debian.or.jp>
	
	[BZ #650]
	* malloc/malloc.h: Always include features.h.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/malloc/malloc.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.26&r2=1.26.4.1