diff options
Diffstat (limited to 'src/vmwaremodule.c')
-rw-r--r-- | src/vmwaremodule.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c index 9cc180a..b6c3adf 100644 --- a/src/vmwaremodule.c +++ b/src/vmwaremodule.c @@ -25,12 +25,15 @@ #include <xorg-server.h> #include <xf86.h> -#include <xf86drm.h> #ifdef HAVE_CONFIG_H #include "config.h" #endif +#ifdef HAVE_LIBDRM +#include <xf86drm.h> +#endif + /* * Defines and exported module info. */ @@ -80,6 +83,7 @@ extern XF86ModuleData *VMWGFX_MODULE_DATA; static Bool vmware_check_kernel_module() { +#ifdef HAVE_LIBDRM /* Super simple way of knowing if the kernel driver is loaded */ int ret = drmOpen(VMWGFX_MODULE_NAME, NULL); if (ret < 0) { @@ -96,11 +100,15 @@ vmware_check_kernel_module() drmClose(ret); return TRUE; +#else + return FALSE; +#endif /* HAVE_LIBDRM */ } static Bool vmware_check_vmwgfx_driver(int matched, pointer opts) { +#ifdef HAVE_LIBDRM int major; int minor; pointer module; CARD32 version; @@ -140,6 +148,7 @@ vmware_check_vmwgfx_driver(int matched, pointer opts) err: /* XXX We should drop the reference on the module here */ +#endif /* HAVE_LIBDRM */ return FALSE; } |