Mesa (master): egl_dri2: Use libudev only if available

Alex Deucher agd5f at kemper.freedesktop.org
Tue Jun 7 22:00:14 UTC 2011


Module: Mesa
Branch: master
Commit: ec2b08de774a6aaeb9db201b4f363ff712b83f18
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec2b08de774a6aaeb9db201b4f363ff712b83f18

Author: Benjamin Franzke <benjaminfranzke at googlemail.com>
Date:   Tue Jun  7 21:59:02 2011 +0200

egl_dri2: Use libudev only if available

Broken since 7f881c43dfb4f1aeeab3a84125b5c106c191a43f.

---

 src/egl/drivers/dri2/common.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/dri2/common.c b/src/egl/drivers/dri2/common.c
index 1860a3f..38f5b25 100644
--- a/src/egl/drivers/dri2/common.c
+++ b/src/egl/drivers/dri2/common.c
@@ -1,16 +1,19 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <libudev.h>
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 
 #include "egl_dri2.h"
+
+#ifdef HAVE_LIBUDEV
+
 #define DRIVER_MAP_DRI2_ONLY
 #include "pci_ids/pci_id_driver_map.h"
 
+#include <libudev.h>
+
 static struct udev_device *
 dri2_udev_device_new_from_fd(struct udev *udev, int fd)
 {
@@ -109,3 +112,5 @@ out:
 
    return driver;
 }
+
+#endif /* HAVE_LIBUDEV */




More information about the mesa-commit mailing list