diff options
author | Eric Engestrom | 2018-03-16 12:04:50 -0500 |
---|---|---|
committer | Eric Engestrom | 2018-03-20 09:31:14 -0500 |
commit | 07585200e937a528bd9fad3d5850de68823f27fa (patch) | |
tree | c9adb304c5cd36d77653c8e7a3dd24d34c780f74 | |
parent | e8d3d885b1362caba4f1e1dfa42d45bac7163124 (diff) | |
download | external-libgbm-07585200e937a528bd9fad3d5850de68823f27fa.tar.gz external-libgbm-07585200e937a528bd9fad3d5850de68823f27fa.tar.xz external-libgbm-07585200e937a528bd9fad3d5850de68823f27fa.zip |
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>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | xf86drm.c | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 607d8597..0e36336c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -347,6 +347,8 @@ AC_SUBST(PCIACCESS_LIBS) | |||
347 | 347 | ||
348 | if test "x$UDEV" = xyes; then | 348 | if test "x$UDEV" = xyes; then |
349 | AC_DEFINE(UDEV, 1, [Have UDEV support]) | 349 | AC_DEFINE(UDEV, 1, [Have UDEV support]) |
350 | else | ||
351 | AC_DEFINE(UDEV, 0) | ||
350 | fi | 352 | fi |
351 | 353 | ||
352 | AC_CANONICAL_HOST | 354 | AC_CANONICAL_HOST |
diff --git a/meson.build b/meson.build index 826cd915..b90127aa 100644 --- a/meson.build +++ b/meson.build | |||
@@ -165,9 +165,9 @@ if _libkms != 'false' | |||
165 | with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system()) | 165 | with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system()) |
166 | endif | 166 | endif |
167 | 167 | ||
168 | config.set10('UDEV', with_udev) | ||
168 | if with_udev | 169 | if with_udev |
169 | dep_udev = dependency('udev') | 170 | dep_udev = dependency('udev') |
170 | config.set10('UDEV', true) | ||
171 | else | 171 | else |
172 | dep_udev = [] | 172 | dep_udev = [] |
173 | endif | 173 | endif |
@@ -293,7 +293,7 @@ static int drmMatchBusID(const char *id1, const char *id2, int pci_domain_ok) | |||
293 | * If any other failure happened then it will output error mesage using | 293 | * If any other failure happened then it will output error mesage using |
294 | * drmMsg() call. | 294 | * drmMsg() call. |
295 | */ | 295 | */ |
296 | #if !defined(UDEV) | 296 | #if !UDEV |
297 | static int chown_check_return(const char *path, uid_t owner, gid_t group) | 297 | static int chown_check_return(const char *path, uid_t owner, gid_t group) |
298 | { | 298 | { |
299 | int rv; | 299 | int rv; |
@@ -332,7 +332,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) | |||
332 | int fd; | 332 | int fd; |
333 | mode_t devmode = DRM_DEV_MODE, serv_mode; | 333 | mode_t devmode = DRM_DEV_MODE, serv_mode; |
334 | gid_t serv_group; | 334 | gid_t serv_group; |
335 | #if !defined(UDEV) | 335 | #if !UDEV |
336 | int isroot = !geteuid(); | 336 | int isroot = !geteuid(); |
337 | uid_t user = DRM_DEV_UID; | 337 | uid_t user = DRM_DEV_UID; |
338 | gid_t group = DRM_DEV_GID; | 338 | gid_t group = DRM_DEV_GID; |
@@ -361,7 +361,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) | |||
361 | devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH); | 361 | devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH); |
362 | } | 362 | } |
363 | 363 | ||
364 | #if !defined(UDEV) | 364 | #if !UDEV |
365 | if (stat(DRM_DIR_NAME, &st)) { | 365 | if (stat(DRM_DIR_NAME, &st)) { |
366 | if (!isroot) | 366 | if (!isroot) |
367 | return DRM_ERR_NOT_ROOT; | 367 | return DRM_ERR_NOT_ROOT; |
@@ -414,7 +414,7 @@ wait_for_udev: | |||
414 | if (fd >= 0) | 414 | if (fd >= 0) |
415 | return fd; | 415 | return fd; |
416 | 416 | ||
417 | #if !defined(UDEV) | 417 | #if !UDEV |
418 | /* Check if the device node is not what we expect it to be, and recreate it | 418 | /* Check if the device node is not what we expect it to be, and recreate it |
419 | * and try again if so. | 419 | * and try again if so. |
420 | */ | 420 | */ |