summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/piglit
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-02-13 09:01:08 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-14 13:53:36 +0000
commit1523bba26fd86cbf13793ecdda2d745b5ca44e30 (patch)
treeca5666f47680cd2fc21bd4326b5ef4607cb409b8 /meta/recipes-graphics/piglit
parentb080cecd056770c703c5297fbcd0af38768fe47c (diff)
downloadpoky-1523bba26fd86cbf13793ecdda2d745b5ca44e30.tar.gz
piglit: Fix build with musl
(From OE-Core rev: 62885b6943763bf093dbb3c4b9ea1b30d0f51966) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/piglit')
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch31
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch b/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch
new file mode 100644
index 0000000000..35e919e552
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0001-utils-Include-libgen.h-on-musl-linux-systems.patch
@@ -0,0 +1,31 @@
1From 232a67b651ccb415b7d4d47584613359b7ebd920 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 13 Feb 2024 08:53:37 -0800
4Subject: [PATCH] utils: Include libgen.h on musl/linux systems
5
6musl does not provide GNU basename like string.h on glibc based systems
7does, it does provide the POSIX compliant basename function therefore
8allow to include libgen.h on non-glibc based linux systems
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/877]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 tests/util/piglit-util.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
17index 4d3606c70..fdfd903b3 100644
18--- a/tests/util/piglit-util.h
19+++ b/tests/util/piglit-util.h
20@@ -52,7 +52,7 @@ extern "C" {
21 #include <math.h>
22 #include <float.h>
23
24-#if defined(__APPLE__) || defined(__MINGW32__)
25+#if defined(__APPLE__) || defined(__MINGW32__) || (defined(__linux__) && !defined(__GLIBC__))
26 # include "libgen.h" // for basename
27 #elif defined(_MSC_VER)
28
29--
302.43.1
31
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 1bc3b784c7..ab749f7867 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -10,6 +10,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma
10 file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ 10 file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
11 file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ 11 file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
12 file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \ 12 file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \
13 file://0001-utils-Include-libgen.h-on-musl-linux-systems.patch \
13 " 14 "
14UPSTREAM_CHECK_COMMITS = "1" 15UPSTREAM_CHECK_COMMITS = "1"
15 16