diff --git a/dlls/x11drv/xvidmode.c b/dlls/x11drv/xvidmode.c
index 60fb8049de61b2f1496a6f309f0a58fdb35cb1d8..68d438dd437fd526fdf6c1bf968b90304b071dd5 100644
--- a/dlls/x11drv/xvidmode.c
+++ b/dlls/x11drv/xvidmode.c
@@ -4,12 +4,10 @@
  * Copyright 2001 TransGaming Technologies, Inc.
  */
 
-#include "config.h"
-#include <string.h>
-
 /* FIXME: ChangeDisplaySettings ought to be able to use this */
 
-#ifdef HAVE_LIBXXF86VM
+#include "config.h"
+#include <string.h>
 
 #include "ts_xlib.h"
 #include "ts_xf86vmode.h"
@@ -24,6 +22,8 @@
 
 DEFAULT_DEBUG_CHANNEL(x11drv);
 
+#ifdef HAVE_LIBXXF86VM
+
 static int xf86vm_event, xf86vm_error, xf86vm_major, xf86vm_minor;
 
 LPDDHALMODEINFO xf86vm_modes;