xorg_list: define the xorg_list* symbols

...when building against pre 1.12 x.
The build will fail as earlier versions of X were missing the xorg_
prefix of the symbols - struct and util functions.

Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Emil Velikov
2014-07-01 22:31:47 +01:00
committed by Ben Skeggs
parent f6c1c755d8
commit edd1608c39
3 changed files with 26 additions and 0 deletions

View File

@@ -127,6 +127,19 @@ AC_SUBST([DRIVER_NAME])
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
AC_CHECK_HEADERS([list.h],
[have_list_h="yes"], [have_list_h="no"],
[#include <X11/Xdefs.h>
#include "xorg-server.h"])
if test "x$have_list_h" = xyes; then
AC_CHECK_DECL(xorg_list_init,
[AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [],
[#include <X11/Xdefs.h>
#include "xorg-server.h"
#include "list.h"])
fi
AC_MSG_CHECKING([whether to include GLAMOR support])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM(

View File

@@ -126,6 +126,14 @@ drmmode_swap(ScrnInfoPtr scrn, uint32_t next, uint32_t *prev)
drmmode->fb_id = next;
}
#if !HAVE_XORG_LIST
#define xorg_list list
#define xorg_list_for_each_entry list_for_each_entry
#define xorg_list_for_each_entry_safe list_for_each_entry_safe
#define xorg_list_append list_append
#define xorg_list_del list_del
#endif
struct drmmode_event {
struct xorg_list head;
drmmode_ptr drmmode;

View File

@@ -37,6 +37,11 @@
#include "nouveau_present.h"
#include "nouveau_sync.h"
#if !HAVE_XORG_LIST
#define xorg_list_is_empty list_is_empty
#define xorg_list_for_each_entry list_for_each_entry
#endif
/*
* Forward definitions for the functions that make up the driver.
*/