Message ID | 20180316171227.2968-3-eric.engestrom@imgtec.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 16 March 2018 at 17:12, Eric Engestrom <eric.engestrom@imgtec.com> wrote: > Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> > --- > configure.ac | 2 ++ > meson.build | 2 +- > xf86drm.c | 8 ++++---- > 3 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 14baa1c87f9078f336fa..619af49726d198c5d685 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -347,6 +347,8 @@ AC_SUBST(PCIACCESS_LIBS) > > 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 8d4d38b46ebcf75b9fb6..0fe04a1411963c70cf80 100644 > --- a/meson.build > +++ b/meson.build > @@ -165,9 +165,9 @@ if _libkms != 'false' > with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system()) > endif > > +config.set10('UDEV', with_udev) This looks fine. > if with_udev > dep_udev = dependency('udev') > - config.set10('UDEV', true) > else > dep_udev = [] > endif Does this pull udev.pc or libudev.pc? In either case the whole thing can go - see 0ec7252a1deba3bac78b5ba1ebd2898f6bbf0332 + parent commit. The series is Reviewed-by: Emil Velikov <emil.velikov@collabora.com> -Emil
On March 16, 2018 5:25:12 PM UTC, Emil Velikov <emil.l.velikov@gmail.com> wrote: > On 16 March 2018 at 17:12, Eric Engestrom <eric.engestrom@imgtec.com> > wrote: > > Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> > > --- > > configure.ac | 2 ++ > > meson.build | 2 +- > > xf86drm.c | 8 ++++---- > > 3 files changed, 7 insertions(+), 5 deletions(-) > > > > diff --git a/configure.ac b/configure.ac > > index 14baa1c87f9078f336fa..619af49726d198c5d685 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -347,6 +347,8 @@ AC_SUBST(PCIACCESS_LIBS) > > > > 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 8d4d38b46ebcf75b9fb6..0fe04a1411963c70cf80 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -165,9 +165,9 @@ if _libkms != 'false' > > with_libkms = _libkms == 'true' or ['linux', 'freebsd', > 'dragonfly'].contains(host_machine.system()) > > endif > > > > +config.set10('UDEV', with_udev) > This looks fine. > > > > if with_udev > > dep_udev = dependency('udev') > > - config.set10('UDEV', true) > > else > > dep_udev = [] > > endif > Does this pull udev.pc or libudev.pc? udev.pc, which I think is libudev (not on a computer right now, too complicated to double check) > > In either case the whole thing can go - see > 0ec7252a1deba3bac78b5ba1ebd2898f6bbf0332 + parent commit. Sure; I'll double check that this is true for meson as well, and make another patch atop this series for that next week :) > > The series is > Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Thanks; I'll push it next week though :) > > -Emil > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/configure.ac b/configure.ac index 14baa1c87f9078f336fa..619af49726d198c5d685 100644 --- a/configure.ac +++ b/configure.ac @@ -347,6 +347,8 @@ AC_SUBST(PCIACCESS_LIBS) 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 8d4d38b46ebcf75b9fb6..0fe04a1411963c70cf80 100644 --- a/meson.build +++ b/meson.build @@ -165,9 +165,9 @@ if _libkms != 'false' 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 117b0fc9e4a0158cf384..689e8fe9fe356957f03e 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -290,7 +290,7 @@ static int drmMatchBusID(const char *id1, const char *id2, int pci_domain_ok) * 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; @@ -329,7 +329,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) 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; @@ -358,7 +358,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) 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; @@ -411,7 +411,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) 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. */
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> --- configure.ac | 2 ++ meson.build | 2 +- xf86drm.c | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-)