Bug 3992

Summary: stdlib/fmtmsg.c: missing stdint.h include
Product: glibc Reporter: Aurelien Jarno <aurelien>
Component: libcAssignee: Carlos O'Donell <carlos>
Status: RESOLVED FIXED    
Severity: normal CC: carlos, glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: i686-unknown-gnu0.3 Target: i686-unknown-gnu0.3
Build: i686-unknown-gnu0.3 Last reconfirmed:

Description Aurelien Jarno 2007-02-07 14:18:51 UTC
stdlib/fmtmsg.c is using a uint32_t type, but does not include stdint.h. This 
make the glibc to fail to build on Hurd. On other architectures, I guess 
stdint.h is included by one of the architecture specific headers.

The patches below fixes the problem:


Index: stdlib/fmtmsg.c
===================================================================
RCS file: /cvs/glibc/libc/stdlib/fmtmsg.c,v
retrieving revision 1.20
diff -u -d -p -r1.20 stdlib/fmtmsg.c
--- stdlib/fmtmsg.c    15 May 2006 18:41:18 -0000      1.20
+++ stdlib/fmtmsg.c    7 Feb 2007 14:06:37 -0000
@@ -20,6 +20,7 @@
 #include <fmtmsg.h>
 #include <bits/libc-lock.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/syslog.h>
Comment 1 Ulrich Drepper 2007-02-07 17:00:17 UTC
I've said multiple times that the correct thing to do is to mimic what the other
archs do and include the same headers.  Otherwise there will always be these
kind of problems.
Comment 2 Carlos O'Donell 2012-02-28 03:35:30 UTC
Fixed by commit 433f48bf3ba7120b9a16ed4816d630f250ea4d92.

Thanks.