gentoo/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-6.1.2-musl.patch
Sv. Lockal e4d636c887
dev-libs/rocm-opencl-runtime: add 6.3.0, drop 6.2.4
Apply must patch to 6.1.2 to fix compilation there too.

Closes: https://bugs.gentoo.org/939920
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-05 21:46:25 +00:00

25 lines
566 B
Diff

Fix "basename" and "__cpu_mask" definitions for musl
Upstream PR: https://github.com/ROCm/clr/pull/83
--- a/rocclr/os/os.hpp
+++ b/rocclr/os/os.hpp
@@ -29,6 +29,7 @@
#if defined(__linux__)
#include <sched.h>
+#include <libgen.h>
#endif
#ifdef _WIN32
@@ -377,6 +378,10 @@ ALWAYSINLINE address Os::currentStackPtr() {
#if defined(__linux__)
+#ifndef __GLIBC__
+typedef unsigned long int __cpu_mask;
+#endif
+
inline void Os::ThreadAffinityMask::init() { CPU_ZERO(&mask_); }
inline void Os::ThreadAffinityMask::set(uint cpu) { CPU_SET(cpu, &mask_); }