[PATCH] headers: Fix build errors with latest glibc
Hans de Goede
hdegoede at redhat.com
Mon Jul 14 05:51:23 PDT 2014
On 07/14/2014 02:43 PM, Julien Cristau wrote:
> On Mon, Jul 14, 2014 at 14:33:00 +0200, Hans de Goede wrote:
>> Hi Daniel,
>> Can I / we please get a reply from you on this ?
>> As explained below this is not about glamor.h, but about
>> making os.h safe to include which really is an
>> orthogonal problem, The glamor.h usage of os.h was
>> just a (bad) example.
> The drivers need to include xorg-server.h before any other server
> header. AFAICT that's true both before and after your patch.
Well in practice they are not doing that, and they are getting
away with it (iow everything works just fine), except that
os.h starts re-defining system libc functions.
I really don't want to go and fix every single driver out there.
There may be some headers where drivers really *must* include
xorg-server.h first, but os.h is not one of them. So far we've
been getting away with os.h redefining e.g. strndup, but with
the latest glibc things have started to conflict.
I know X is really really old, so we have a bunch of legacy,
like headers which do not work stand-alone (which is considered
a big no no in modern C development practices). But just because
we have this legacy we should no strive to do better.
So there are 2 reasons to make these changes to os.h:
1) It avoids the need to fix every single driver out there
2) It is simply the right thing to do
More information about the xorg-devel