summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2020-02-18 16:12:23 -0500
committerDylan Baker <dylan@pnwbakers.com>2020-02-20 09:10:40 -0800
commit5adcb0a62acc57e15cbb656f628c76b8d16a17c8 (patch)
tree0dee8882dbe8db17f87a31158adb62b2aeee1a1e
parent01020aef25cca94713ac860256d2eb6296b45d1a (diff)
util: remove the dependency on kcmp.h
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> (cherry picked from commit f7bfb10c69dfe48a91e35523cb5ee641bdbf6988)
-rw-r--r--.pick_status.json2
-rw-r--r--src/util/os_file.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 409d0b76d92..3dc0c2cbb89 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -67,7 +67,7 @@
"description": "util: remove the dependency on kcmp.h",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "f76cbc7901f7d500f5a4f74aedfd29970d1efd00"
},
diff --git a/src/util/os_file.c b/src/util/os_file.c
index b502ff4b0ef..128fe872db1 100644
--- a/src/util/os_file.c
+++ b/src/util/os_file.c
@@ -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)