mirror of
https://github.com/X11Libre/xf86-video-nouveau.git
synced 2026-03-24 09:34:20 +00:00
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:
13
configure.ac
13
configure.ac
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user