Hi Pali,
If the future can you include the error message (plus a couple of lines of
context) in the email ? Thanks.
Seems like the list* symbols got prefixed with xorg_ during the 1.12
development cycle (commit ca64912c02b), and your build uses 1.11.x.
I'm using xorg-server 1.15 so cannot really test this but the attached patch
should help. Can you give it a try ?
Cheers,
Emil
On 01/07/14 20:47, Pali Rohár wrote:
Hello,
nouveau xorg driver from master git repository cannot be compiled
on ubuntu precise. Here is build log:
https://launchpadlibrarian.net/179062836/buildlog_ubuntu-precise-amd64.xserver-xorg-video-nouveau_1:1.0.10-git201407010817~ubuntu12.04.1_FAILEDTOBUILD.txt.gz
Problem is somewhere in drmmode_display.c. Can somebody look at
it and fix compile error problems?
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
From d437ca90803ddf70190cdbaf617e815f6441f134 Mon Sep 17 00:00:00 2001
From: Emil Velikov emil.l.veli...@gmail.com
Date: Tue, 1 Jul 2014 22:31:47 +0100
Subject: [PATCH] xorg_list: define the xorg_list* symbols
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
...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.ro...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com
---
configure.ac | 13 +
src/drmmode_display.c | 8
src/nv_driver.c | 5 +
3 files changed, 26 insertions(+)
diff --git a/configure.ac b/configure.ac
index 92e047a..2177c24 100644
--- a/configure.ac
+++ b/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(
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 58b5e07..45225ad 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -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_entrylist_for_each_entry
+#define xorg_list_for_each_entry_safe list_for_each_entry_safe
+#define xorg_list_appendlist_append
+#define xorg_list_del list_del
+#endif
+
struct drmmode_event {
struct xorg_list head;
drmmode_ptr drmmode;
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 44a0963..2fa3802 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -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_entrylist_for_each_entry
+#endif
+
/*
* Forward definitions for the functions that make up the driver.
*/
--
2.0.0
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau