diff options
Diffstat (limited to 'recipes-graphics/mesa/files/0001-src-util-disk_cache_os.c-Add-missing-headers-for-ope.patch')
-rw-r--r-- | recipes-graphics/mesa/files/0001-src-util-disk_cache_os.c-Add-missing-headers-for-ope.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/recipes-graphics/mesa/files/0001-src-util-disk_cache_os.c-Add-missing-headers-for-ope.patch b/recipes-graphics/mesa/files/0001-src-util-disk_cache_os.c-Add-missing-headers-for-ope.patch new file mode 100644 index 0000000..007ef46 --- /dev/null +++ b/recipes-graphics/mesa/files/0001-src-util-disk_cache_os.c-Add-missing-headers-for-ope.patch @@ -0,0 +1,79 @@ +From 3609301ce9ada728259388cadd508b8e9f4473e4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org> +Date: Wed, 14 Oct 2020 14:45:20 -0500 +Subject: [PATCH] src/util/disk_cache_os.c: Add missing headers for open/fcntl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes, strict musl build [1], + +... +17:25:31 ../git/src/util/disk_cache_os.c: In function 'disk_cache_load_item': +17:25:31 ../git/src/util/disk_cache_os.c:526:9: error: implicit declaration of function 'open'; did you mean 'popen'? [-Werror=implicit-function-declaration] +17:25:31 526 | fd = open(filename, O_RDONLY | O_CLOEXEC); +17:25:31 | ^~~~ +17:25:31 | popen +17:25:31 ../git/src/util/disk_cache_os.c:526:24: error: 'O_RDONLY' undeclared (first use in this function) +17:25:31 526 | fd = open(filename, O_RDONLY | O_CLOEXEC); +17:25:31 | ^~~~~~~~ +17:25:31 ../git/src/util/disk_cache_os.c:526:24: note: each undeclared identifier is reported only once for each function it appears in +17:25:31 ../git/src/util/disk_cache_os.c:526:35: error: 'O_CLOEXEC' undeclared (first use in this function); did you mean 'MFD_CLOEXEC'? +17:25:31 526 | fd = open(filename, O_RDONLY | O_CLOEXEC); +17:25:31 | ^~~~~~~~~ +17:25:31 | MFD_CLOEXEC +17:25:31 ../git/src/util/disk_cache_os.c: In function 'disk_cache_write_item_to_disk': +17:25:31 ../git/src/util/disk_cache_os.c:666:28: error: 'O_WRONLY' undeclared (first use in this function) +17:25:31 666 | fd = open(filename_tmp, O_WRONLY | O_CLOEXEC | O_CREAT, 0644); +17:25:31 | ^~~~~~~~ +17:25:31 ../git/src/util/disk_cache_os.c:666:39: error: 'O_CLOEXEC' undeclared (first use in this function); did you mean 'MFD_CLOEXEC'? +17:25:31 666 | fd = open(filename_tmp, O_WRONLY | O_CLOEXEC | O_CREAT, 0644); +17:25:31 | ^~~~~~~~~ +17:25:31 | MFD_CLOEXEC +17:25:31 ../git/src/util/disk_cache_os.c:666:51: error: 'O_CREAT' undeclared (first use in this function) +17:25:31 666 | fd = open(filename_tmp, O_WRONLY | O_CLOEXEC | O_CREAT, 0644); +17:25:31 | ^~~~~~~ +17:25:31 ../git/src/util/disk_cache_os.c:705:30: error: 'O_RDONLY' undeclared (first use in this function) +17:25:31 705 | fd_final = open(filename, O_RDONLY | O_CLOEXEC); +17:25:31 | ^~~~~~~~ +17:25:31 ../git/src/util/disk_cache_os.c: In function 'disk_cache_mmap_cache_index': +17:25:31 ../git/src/util/disk_cache_os.c:902:20: error: 'O_RDWR' undeclared (first use in this function) +17:25:31 902 | fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0644); +17:25:31 | ^~~~~~ +17:25:31 ../git/src/util/disk_cache_os.c:902:29: error: 'O_CREAT' undeclared (first use in this function) +17:25:31 902 | fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0644); +17:25:31 | ^~~~~~~ +17:25:31 ../git/src/util/disk_cache_os.c:902:39: error: 'O_CLOEXEC' undeclared (first use in this function); did you mean 'MFD_CLOEXEC'? +17:25:31 902 | fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0644); +17:25:31 | ^~~~~~~~~ +17:25:31 | MFD_CLOEXEC +17:25:31 cc1: some warnings being treated as errors +... + +[1] https://ci.linaro.org/job/lt-qcom-openembedded-meta-qcom-master-premerge/MACHINE=qrb5165-rb5,TCLIBC=musl,label=docker-buster-amd64/87/console + +Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> + +Upstream-status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7146] +--- + src/util/disk_cache_os.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/util/disk_cache_os.c b/src/util/disk_cache_os.c +index d48fe877c56..c4ee186b519 100644 +--- a/src/util/disk_cache_os.c ++++ b/src/util/disk_cache_os.c +@@ -28,6 +28,10 @@ + #include <stdbool.h> + #include <stddef.h> + #include <stdlib.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <dirent.h> ++#include <fcntl.h> + + #include "zlib.h" + +-- +2.28.0 + |