diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2024-01-25 13:49:49 +0100 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2024-02-01 10:28:43 +0100 |
commit | c9df56573aaf62d79e2535309390d2744e67ff0c (patch) | |
tree | 1d61989797a4983c318200b6ccd1d88baefce081 /graphics | |
parent | ea7579ca8046864e5c29f0a183810305e9bd5576 (diff) | |
download | freebsd-ports-c9df56573aaf62d79e2535309390d2744e67ff0c.zip |
graphics/mesa: Add a patch for testing kcmp
Upstream patch is based on the mesa main branch and this branch have
extra checks for kcmp, add those test locally as they are not in 23.3.4
Fixes: 2080c2eddaca ("graphics/mesa: Update to 23.3.4")
Sponsored by: Beckhoff Automation GmbH & Co. KG
(cherry picked from commit 168e1199a5020101ba16eb7e69feb0fc3d76371a)
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/mesa-dri/files/patch-src_util_os__file.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/graphics/mesa-dri/files/patch-src_util_os__file.c b/graphics/mesa-dri/files/patch-src_util_os__file.c new file mode 100644 index 000000000000..f1bb54593c5a --- /dev/null +++ b/graphics/mesa-dri/files/patch-src_util_os__file.c @@ -0,0 +1,22 @@ +--- src/util/os_file.c.orig 2024-01-25 12:45:07 UTC ++++ src/util/os_file.c +@@ -207,13 +207,19 @@ os_same_file_description(int fd1, int fd2) + int + os_same_file_description(int fd1, int fd2) + { ++#ifdef SYS_kcmp + pid_t pid = getpid(); ++#endif + + /* Same file descriptor trivially implies same file description */ + if (fd1 == fd2) + return 0; + ++#ifdef SYS_kcmp + return syscall(SYS_kcmp, pid, pid, KCMP_FILE, fd1, fd2); ++#else ++ return -1; ++#endif + } + + #else |