summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/onevpl/onevpl/0001-Fix-basename-build-issue-with-musl_libc.patch
blob: 1445327988b4cbd6466c5d81b6a5f13024407e03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 72ceb46b43a7a74d20ced961aaff9366ccce53a9 Mon Sep 17 00:00:00 2001
From: "Yew, Chang Ching" <chang.ching.yew@intel.com>
Date: Mon, 24 Jan 2022 20:49:50 +0800
Subject: [PATCH 1/5] Fix basename() build issue with musl_libc

Upstream-Status: Submitted
innersource PR #264

Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
---
 tools/legacy/sample_common/src/vaapi_utils.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/legacy/sample_common/src/vaapi_utils.cpp b/tools/legacy/sample_common/src/vaapi_utils.cpp
index 86193d17..db71d413 100644
--- a/tools/legacy/sample_common/src/vaapi_utils.cpp
+++ b/tools/legacy/sample_common/src/vaapi_utils.cpp
@@ -7,6 +7,7 @@
 #ifdef LIBVA_SUPPORT
 
     #include "vaapi_utils.h"
+    #include <libgen.h>
     #include <dlfcn.h>
     #include <stdexcept>
 
@@ -24,7 +25,7 @@ namespace MfxLoader {
 
 SimpleLoader::SimpleLoader(const char* name) {
     dlerror();
-    so_handle = dlopen(name, RTLD_GLOBAL | RTLD_NOW);
+    so_handle = dlopen(basename((char *)name), RTLD_GLOBAL | RTLD_NOW);
     if (NULL == so_handle) {
         std::cerr << dlerror() << std::endl;
         throw std::runtime_error("Can't load library");
-- 
2.34.1