diff mbox

xf86drm: fix build error by udev dependency

Message ID FD5696F5CDD4B04D92C97DB96167DECA1619BBB3@SCYBEXDAG04.amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jammy Zhou May 28, 2015, 8:53 a.m. UTC
Thanks for catching this. Patch is Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>

Regards,
Jammy

-----Original Message-----
From: Joonyoung Shim [mailto:jy0922.shim@samsung.com] 
Sent: Thursday, May 28, 2015 8:57 AM
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com; Zhou, Jammy; Deucher, Alexander; jy0922.shim@samsung.com
Subject: [PATCH] xf86drm: fix build error by udev dependency

The build error is introduced by commit fde496917682 ("Add device enumeration interface (v4)") if don't enable udev. Can solve as check UDEV dependency.

  CC       libdrm_la-xf86drm.lo
xf86drm.c:66:21: fatal error: libudev.h: No such file or directory  #include "libudev.h"
                     ^
compilation terminated.
make[2]: *** [libdrm_la-xf86drm.lo] Error 1

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
 xf86drm.c | 4 ++++
 1 file changed, 4 insertions(+)

 
+#if defined(UDEV)
 /**
 * Enumerate the GPU devices on the system
 *
@@ -2917,3 +2920,4 @@ int drmGetPciDevices(drmPciDevicePtr devSet, uint16_t vendorId)
 
 	return drmDevCount;
 }
+#endif
--
1.9.1
diff mbox

Patch

diff --git a/xf86drm.c b/xf86drm.c
index b5a174b..4a31019 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -63,7 +63,9 @@ 
 
 #include "xf86drm.h"
 #include "libdrm_macros.h"
+#if defined(UDEV)
 #include "libudev.h"
+#endif
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)  #define DRM_MAJOR 145 @@ -2819,6 +2821,7 @@ char *drmGetRenderDeviceNameFromFd(int fd)
 	return drmGetMinorNameForFD(fd, DRM_NODE_RENDER);  }