FS#20181 - [glibc] /usr/include/sys/user.h broken

Attached to Project: Arch Linux
Opened by Eric Belanger (Snowman) - Wednesday, 14 July 2010, 19:20 GMT
Last edited by Allan McRae (Allan) - Thursday, 29 July 2010, 10:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Allan McRae (Allan)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

While trying to fix a build issue with psmisc (full details here: https://sourceforge.net/tracker/index.php?func=detail&aid=3029302&group_id=15273&atid=115273 ), I realised that some configure test that were using '#include <sys/user.h>' were failing with the following error:

/usr/include/sys/user.h:32:3: error: expected specifier-qualifier-list before ‘__uint16_t’

Adding '#include <bits/types.h>' before '#include <sys/user.h>', fixed the issue. The psmisc upstrem dev mentionned that his sys/user.h included unistd.h.

Also, sys/user.h have this comment:

/* The whole purpose of this file is for GDB and GDB only. Don't read
too much into it. Don't use it for anything other than GDB unless
you know what you are doing. */

So I'm not sure if this header problem is an actual bug or just a result of a misuse of the sys/user.h header.
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 29 July 2010, 10:54 GMT
Reason for closing:  Upstream
Additional comments about closing:  See final comment
Comment by Allan McRae (Allan) - Thursday, 15 July 2010, 01:36 GMT
  • Field changed: Architecture (All → x86_64)
Looks like an x86_64 only issue as the iX86 version does not user "__uint" sizes.
Comment by Allan McRae (Allan) - Thursday, 15 July 2010, 02:42 GMT
Looking into this further, glibc for x86_64 has had this behaviour since that file was added (~10 years ago). The issue has been struck several times before and has always been worked around by adding an additional header first. Users that reported issues have been pointed to the "Don't use it for anything other than GDB unless you know what you are doing." comment.

Fedora uses this patch for psmisc:
http://cvs.fedoraproject.org/viewvc/rpms/psmisc/devel/psmisc-22.6-types.patch?revision=1.1&view=markup

Comment by Allan McRae (Allan) - Thursday, 15 July 2010, 02:59 GMT Comment by Allan McRae (Allan) - Thursday, 29 July 2010, 10:54 GMT
I am going to close this as upstream. Other distros have closed similar bugs and I will not be making changes to glibc without upstream approving them. When the above bug report gets addressed upstream, I will get the fix into Arch.

Loading...