Bug 11820 - sys/user.h requires additional header in x86_64 to define types
Summary: sys/user.h requires additional header in x86_64 to define types
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.12
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-15 02:59 UTC by Allan McRae
Modified: 2014-06-30 17:32 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allan McRae 2010-07-15 02:59:16 UTC
In sysdeps/unix/sysv/linux/x86_64/sys/user.h when __WORDSIZE==64, the struct
user_fpregs_struct is defined using __uintXX_t types.  These are not defined in
any of its #include's so any program that includes <sys/user.h> without
including <bits/types.h> first leads to a compile failure on x86_64.

I realise that sys/user.h says "Don't use it for anything other than GDB unless
you know what you are doing", but I am unsure whether requiring an additional
include on one particular platform is covered by that...
Comment 1 Ulrich Drepper 2011-05-16 05:36:21 UTC
I've checked in a patch but you shouldn't use the header.