Bug 229553 - Conflicting types between xorg-x11-server-sdk and glibc-headers
Conflicting types between xorg-x11-server-sdk and glibc-headers
Product: Fedora
Classification: Fedora
Component: xorg-x11-server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adam Jackson
Depends On:
  Show dependency treegraph
Reported: 2007-02-21 14:53 EST by Axel Thimm
Modified: 2018-04-11 03:47 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-02 12:54:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Axel Thimm 2007-02-21 14:53:28 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'
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 04:09:17 EST
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 15:31:18 EST
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 16:09:51 EST
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 18:24:38 EST
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 18:46:33 EST
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 12:54:35 EST
I am afraid, you are right. Closing as NOTABUG.
Comment 7 Adam Jackson 2007-03-05 17:08:39 EST
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.