Red Hat Bugzilla – Bug 229553
Conflicting types between xorg-x11-server-sdk and glibc-headers
Last modified: 2007-11-30 17:11:57 EST
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'
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
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.
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?
Thanks for the insight, the file in question is
and indeed xf86_ansic.h is included before sys/mman.h. What do you recommend?
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.
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
I am afraid, you are right. Closing as NOTABUG.
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.