media-libs/amdvlk: add a patch to try supporting building with musl

Works on my machine with sys-libs/musl-9999, although I have not checked with the stable releases

Signed-off-by: Charlie Quinet <w.iron.zombie@gmail.com>
This commit is contained in:
Charlie Quinet
2025-02-09 20:19:35 +01:00
parent 2e54421376
commit deb5dcd847
2 changed files with 30 additions and 0 deletions

View File

@@ -99,6 +99,8 @@ pkg_pretend(){
}
src_prepare() {
use elibc_musl && PATCHES+=( "${FILESDIR}/amdvlk-2025.1.1-support-musl.patch" )
einfo "moving src to proper directories"
mkdir third_party || die
mv xgl-${XGL_COMMIT}/ xgl || die

View File

@@ -0,0 +1,28 @@
diff --git a/pal/src/util/file.cpp b/pal/src/util/file.cpp
index db9df291..61c1969f 100644
--- a/pal/src/util/file.cpp
+++ b/pal/src/util/file.cpp
@@ -481,7 +481,7 @@ void File::Seek(
{
if (m_pFileHandle != nullptr)
{
- const int32 ret = fseeko64(m_pFileHandle, offset, static_cast<int>(pos));
+ const int32 ret = fseeko(m_pFileHandle, offset, static_cast<int>(pos));
PAL_ASSERT(ret == 0);
}
}
diff --git a/pal/src/util/lnx/lnxSysUtil.cpp b/pal/src/util/lnx/lnxSysUtil.cpp
index 0a05f3ae..ec05e28d 100644
--- a/pal/src/util/lnx/lnxSysUtil.cpp
+++ b/pal/src/util/lnx/lnxSysUtil.cpp
@@ -51,6 +51,10 @@
#include <sys/types.h>
#include <unistd.h>
+#if !defined(ACCESSPERMS)
+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
+#endif
+
using namespace std::chrono;
namespace Util