summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e8d3d88)
raw | patch | inline | side by side (parent: e8d3d88)
author | Eric Engestrom <eric.engestrom@imgtec.com> | |
Fri, 16 Mar 2018 17:04:50 +0000 (17:04 +0000) | ||
committer | Eric Engestrom <eric.engestrom@imgtec.com> | |
Tue, 20 Mar 2018 14:31:14 +0000 (14:31 +0000) |
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
configure.ac | patch | blob | history | |
meson.build | patch | blob | history | |
xf86drm.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 607d85970c5c5134c4427b70177f3d7478fd09ba..0e36336c93f2ca3e655746c5f6d7b1c46c5aa898 100644 (file)
--- a/configure.ac
+++ b/configure.ac
if test "x$UDEV" = xyes; then
AC_DEFINE(UDEV, 1, [Have UDEV support])
+else
+ AC_DEFINE(UDEV, 0)
fi
AC_CANONICAL_HOST
diff --git a/meson.build b/meson.build
index 826cd915136c17d52dd906486d4a33966c3f61e8..b90127aa1fbc879ffb3295708d122562f2ce1900 100644 (file)
--- a/meson.build
+++ b/meson.build
with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system())
endif
+config.set10('UDEV', with_udev)
if with_udev
dep_udev = dependency('udev')
- config.set10('UDEV', true)
else
dep_udev = []
endif
diff --git a/xf86drm.c b/xf86drm.c
index 344326db0cab492fb87283eed011ca6502451b86..9328bf5a5f5747eadee5ad2ac8d586df69b94735 100644 (file)
--- a/xf86drm.c
+++ b/xf86drm.c
* If any other failure happened then it will output error mesage using
* drmMsg() call.
*/
-#if !defined(UDEV)
+#if !UDEV
static int chown_check_return(const char *path, uid_t owner, gid_t group)
{
int rv;
int fd;
mode_t devmode = DRM_DEV_MODE, serv_mode;
gid_t serv_group;
-#if !defined(UDEV)
+#if !UDEV
int isroot = !geteuid();
uid_t user = DRM_DEV_UID;
gid_t group = DRM_DEV_GID;
devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
}
-#if !defined(UDEV)
+#if !UDEV
if (stat(DRM_DIR_NAME, &st)) {
if (!isroot)
return DRM_ERR_NOT_ROOT;
if (fd >= 0)
return fd;
-#if !defined(UDEV)
+#if !UDEV
/* Check if the device node is not what we expect it to be, and recreate it
* and try again if so.
*/