[PATCH xf86-video-vmware] Fix include order.

Cyril Brulebois kibi at debian.org
Fri Jan 21 11:07:01 PST 2011


HAVE_LIBDRM comes from config.h, so include it first.

With CFLAGS="-Wall -Werror", the build fails with:
|   CC     vmware_drv_la-vmwaremodule.lo
| cc1: warnings being treated as errors
| vmwaremodule.c: In function ‘vmware_check_kernel_module’:
| vmwaremodule.c:100: error: implicit declaration of function ‘drmOpen’
| vmwaremodule.c:112: error: implicit declaration of function ‘drmClose’

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 src/vmwaremodule.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c
index a7ba854..2754879 100644
--- a/src/vmwaremodule.c
+++ b/src/vmwaremodule.c
@@ -26,14 +26,14 @@
 #include <xorg-server.h>
 #include <xf86.h>
 
-#ifdef HAVE_LIBDRM
-#include <xf86drm.h>
-#endif
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#ifdef HAVE_LIBDRM
+#include <xf86drm.h>
+#endif
+
 #ifndef HAVE_XORG_SERVER_1_5_0
 #include <xf86_ansic.h>
 #include <xf86_libc.h>
-- 
1.7.2.3



More information about the xorg-devel mailing list