meson,configure: always define UDEV
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>main
parent
e8d3d885b1
commit
07585200e9
|
@ -347,6 +347,8 @@ AC_SUBST(PCIACCESS_LIBS)
|
||||||
|
|
||||||
if test "x$UDEV" = xyes; then
|
if test "x$UDEV" = xyes; then
|
||||||
AC_DEFINE(UDEV, 1, [Have UDEV support])
|
AC_DEFINE(UDEV, 1, [Have UDEV support])
|
||||||
|
else
|
||||||
|
AC_DEFINE(UDEV, 0)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
|
@ -165,9 +165,9 @@ if _libkms != 'false'
|
||||||
with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system())
|
with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system())
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
config.set10('UDEV', with_udev)
|
||||||
if with_udev
|
if with_udev
|
||||||
dep_udev = dependency('udev')
|
dep_udev = dependency('udev')
|
||||||
config.set10('UDEV', true)
|
|
||||||
else
|
else
|
||||||
dep_udev = []
|
dep_udev = []
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -293,7 +293,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
|
* If any other failure happened then it will output error mesage using
|
||||||
* drmMsg() call.
|
* drmMsg() call.
|
||||||
*/
|
*/
|
||||||
#if !defined(UDEV)
|
#if !UDEV
|
||||||
static int chown_check_return(const char *path, uid_t owner, gid_t group)
|
static int chown_check_return(const char *path, uid_t owner, gid_t group)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
|
@ -332,7 +332,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type)
|
||||||
int fd;
|
int fd;
|
||||||
mode_t devmode = DRM_DEV_MODE, serv_mode;
|
mode_t devmode = DRM_DEV_MODE, serv_mode;
|
||||||
gid_t serv_group;
|
gid_t serv_group;
|
||||||
#if !defined(UDEV)
|
#if !UDEV
|
||||||
int isroot = !geteuid();
|
int isroot = !geteuid();
|
||||||
uid_t user = DRM_DEV_UID;
|
uid_t user = DRM_DEV_UID;
|
||||||
gid_t group = DRM_DEV_GID;
|
gid_t group = DRM_DEV_GID;
|
||||||
|
@ -361,7 +361,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type)
|
||||||
devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
|
devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(UDEV)
|
#if !UDEV
|
||||||
if (stat(DRM_DIR_NAME, &st)) {
|
if (stat(DRM_DIR_NAME, &st)) {
|
||||||
if (!isroot)
|
if (!isroot)
|
||||||
return DRM_ERR_NOT_ROOT;
|
return DRM_ERR_NOT_ROOT;
|
||||||
|
@ -414,7 +414,7 @@ wait_for_udev:
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
return fd;
|
return fd;
|
||||||
|
|
||||||
#if !defined(UDEV)
|
#if !UDEV
|
||||||
/* Check if the device node is not what we expect it to be, and recreate it
|
/* Check if the device node is not what we expect it to be, and recreate it
|
||||||
* and try again if so.
|
* and try again if so.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue