Bug 229553 - Conflicting types between xorg-x11-server-sdk and glibc-headers
Summary: Conflicting types between xorg-x11-server-sdk and glibc-headers
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-server
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Adam Jackson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-21 19:53 UTC by Axel Thimm
Modified: 2018-04-11 07:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-03-02 17:54:35 UTC
Type: ---

Attachments (Terms of Use)

Description Axel Thimm 2007-02-21 19:53:28 UTC
Currently rawhide has conflicting definitions of for example xf86mmap

/usr/include/sys/mman.h:58: error: conflicting types for 'xf86mmap'
/usr/include/xorg/xf86_ansic.h:265: error: previous declaration of 'xf86mmap'
was here

Version-Release number of selected component (if applicable):

I'm not sure whether this is better suited under glibc than xorg-x11-server, I
just made an arbitrary choice. Please move over to the proper component, if that
wasn't correct.


Comment 1 Matěj Cepl 2007-03-01 09:09:17 UTC
When asking jakub (glibc maintainer) he told me this:

Yes, this is your (i.e., Xorg) problem. Glibc has there this

extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int
__fd, __off_t __offset);

His guess is that Xorg redefines mmap, which is OK, but it has to be done AFTER
#include of standard headers, not before. It might be that #include <sys/mman.h>
somewhere in the Xorg headers would fix this.

Comment 2 Adam Jackson 2007-03-01 20:31:18 UTC
Mmm, I think not.  If you're using the xf86 libc wrapper, you are obligated to
not also try to use libc directly, and in particular you shouldn't be including
any libc headers _after_ xf86_ansic.h.  What are you building that's hitting this?

Comment 3 Axel Thimm 2007-03-01 21:09:51 UTC
Thanks for the insight, the file in question is


and indeed xf86_ansic.h is included before sys/mman.h. What do you recommend?

Comment 4 Adam Jackson 2007-03-01 23:24:38 UTC
Well, given that the libc wrapper is actively deprecated even as of 7.1, I'd
suggest ripping out every mention of xf86_ansic.h in the source, and adding
sufficient standard C headers until it builds again.

Comment 5 Axel Thimm 2007-03-01 23:46:33 UTC
OK, does that work for older X, too? This currently builds and is used in RHEL4

Regarding the bug report, it looks like this is NOTABUG, e.g. wrong usage of
headers, correct?

Comment 6 Matěj Cepl 2007-03-02 17:54:35 UTC
I am afraid, you are right. Closing as NOTABUG.

Comment 7 Adam Jackson 2007-03-05 22:08:39 UTC
Won't work on any X server that didn't build libdl modules, I believe.  dlloader
is the default in 7.0 and later, elfloader before that.

Note You need to log in before you can comment on or make changes to this bug.