Bug 3992 - stdlib/fmtmsg.c: missing stdint.h include
Summary: stdlib/fmtmsg.c: missing stdint.h include
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Carlos O'Donell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-07 14:18 IST by Aurelien Jarno
Modified: 2016-02-26 15:07 IST (History)
2 users (show)

See Also:
Host: i686-unknown-gnu0.3
Target: i686-unknown-gnu0.3
Build: i686-unknown-gnu0.3
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aurelien Jarno 2007-02-07 14:18:51 IST
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 IST
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 IST
Fixed by commit 433f48bf3ba7120b9a16ed4816d630f250ea4d92.

Thanks.