[PATCH] xf86xv.h cannot be included without first including xorg-server.h.

Daniel Martin consume.noise at gmail.com
Tue Oct 7 02:46:22 PDT 2014


On 7 October 2014 11:29, Stefan Dirsch <sndirsch at suse.de> wrote:
> Without this the build fails on systems with the latest glibc,
> throwing this error:
>
> In file included from /usr/include/string.h:634:0,
>                  from /usr/include/xorg/os.h:53,
>                  from /usr/include/xorg/misc.h:115,
>                  from /usr/include/xorg/screenint.h:50,
>                  from /usr/include/xorg/scrnintstr.h:50,
>                  from /usr/include/xorg/xvdix.h:55,
>                  from /usr/include/xorg/xf86xv.h:32,
>                  from vmwgfx_overlay.c:38:
> /usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
> strndup(const char *str, size_t n);
>
> This is caused by HAVE_STRNDUP not being set (it is set from xorg-server.h),
> causing os.h to redefine it.

Have a look at this commit in xf86-video-intel:
    http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=d209b03915e4d12ce445d72ac09bb4fe664ba664

With that HAVE_STRNDUP will be defined in config.h,
which looks like a better solution to me.


Cheers,
    Daniel Martin


More information about the xorg-devel mailing list