Skip to content

Commit

Permalink
graphics/mesa: Add a patch for testing kcmp
Browse files Browse the repository at this point in the history
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:		2080c2e ("graphics/mesa: Update to 23.3.4")
Sponsored by:	Beckhoff Automation GmbH & Co. KG
  • Loading branch information
evadot committed Jan 25, 2024
1 parent 05d0f78 commit 168e119
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions 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

0 comments on commit 168e119

Please sign in to comment.