head 1.1; access; symbols; locks; strict; comment @// @; 1.1 date 2026.09.25.17.16.20; author ktnb; state Exp; branches; next ; commitid OshfPWW7wiDAG1XG; desc @@ 1.1 log @shader-slang: fixed shared lib bug on Darwin @ text @$NetBSD$ Fix missing dylibs on Darwin --- source/core/slang-platform.cpp.orig 2026-09-25 15:20:55.776172514 +0000 +++ source/core/slang-platform.cpp @@@@ -322,6 +322,13 @@@@ SLANG_COMPILE_TIME_ASSERT(E_OUTOFMEMORY platformFileName = nullptr; const auto mode = RTLD_NOW | RTLD_LOCAL | (isUnclosable ? RTLD_NODELETE : 0); void* h = dlopen(platformFileName, mode); +#if defined(__APPLE__) + if (!h && platformFileName && !strchr(platformFileName, '/')) + { + String rel = String("@@loader_path/") + platformFileName; + h = dlopen(rel.getBuffer(), mode); + } +#endif if (!h) { #if 0 @