Mesa (main): radv: fix build on BSD

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 22 17:34:55 UTC 2022


Module: Mesa
Branch: main
Commit: 83ee08f6d1a5a3cbb2a8f9a2866a7366ea0311ef
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=83ee08f6d1a5a3cbb2a8f9a2866a7366ea0311ef

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon Feb 21 12:54:48 2022 +0100

radv: fix build on BSD

Just disable inotify for BDS systems.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6060
Fixes: c50557d9612 ("radv: allow applications to dynamically change RADV_FORCE_VRS")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15105>

---

 src/amd/vulkan/radv_device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 7044f728a8d..4de92115c15 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -35,7 +35,7 @@
 #include <sys/sysmacros.h>
 #endif
 
-#ifndef _WIN32
+#ifdef __linux__
 #include <sys/inotify.h>
 #endif
 
@@ -2974,7 +2974,7 @@ radv_parse_force_vrs_config_file(const char *config_file)
    return force_vrs;
 }
 
-#ifndef _WIN32
+#ifdef __linux__
 
 #define BUF_LEN ((10 * (sizeof(struct inotify_event) + NAME_MAX + 1)))
 
@@ -3020,7 +3020,7 @@ radv_notifier_thread_run(void *data)
 static int
 radv_device_init_notifier(struct radv_device *device)
 {
-#ifdef _WIN32
+#ifndef __linux__
    return true;
 #else
    struct radv_notifier *notifier = &device->notifier;
@@ -3053,7 +3053,7 @@ fail_watch:
 static void
 radv_device_finish_notifier(struct radv_device *device)
 {
-#ifndef _WIN32
+#ifdef __linux__
    struct radv_notifier *notifier = &device->notifier;
 
    if (!notifier->thread)



More information about the mesa-commit mailing list