util: remove the dependency on kcmp.h
authorMarek Olšák <marek.olsak@amd.com>
Tue, 18 Feb 2020 21:12:23 +0000 (16:12 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 20 Feb 2020 00:15:23 +0000 (00:15 +0000)
Fixes: f76cbc7901f7 "util: Add os_same_file_description helper"
Acked-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3860>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3860>

src/util/os_file.c

index b502ff4b0ef8f9bda5e7b62022e64daf84cc92ea..128fe872db1f2f42cf6290266b1f46e1488d6fa8 100644 (file)
@@ -34,11 +34,12 @@ os_file_create_unique(const char *filename, int filemode)
 #if defined(__linux__)
 
 #include <fcntl.h>
-#include <linux/kcmp.h>
 #include <sys/stat.h>
 #include <sys/syscall.h>
 #include <unistd.h>
 
+/* copied from <linux/kcmp.h> */
+#define KCMP_FILE 0
 
 static ssize_t
 readN(int fd, char *buf, size_t len)