From bb60de0e8ebd658703ef09c98499ad41733a660a Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Fri, 23 Oct 2026 18:05:41 +0200 Subject: [PATCH] metal: ds4_os.hpp takes the macOS shim at the top of the file, not inside the Windows block The include had landed between '#ifndef NOMINMAX' and '#include ', so on a Mac it was never reached - that is why the audit still showed every Linux name undeclared. Moved after '#pragma once': ds4_model.cu goes from 20 to 15 errors. The 15 left are four CPU_ZERO/CPU_SET uses (macOS has no cpu_set_t macros) and the __host__/__device__ qualifiers that cuda_runtime.h does not define yet; both are a few lines and are the next step, then the Linux surface of the engine's storage helpers is done. --- src/dsv41/ds4_os.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dsv41/ds4_os.hpp b/src/dsv41/ds4_os.hpp index e339ddb3..0038ff61 100644 --- a/src/dsv41/ds4_os.hpp +++ b/src/dsv41/ds4_os.hpp @@ -6,6 +6,10 @@ // does it for GLM: no FILE_FLAG_RANDOM_ACCESS - the page cache must keep what it read.) #pragma once +#if defined(__APPLE__) +#include "ds4_os_apple.h" // the Linux calls the body uses, on macOS +#endif + #include #include #include @@ -18,9 +22,6 @@ #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #ifndef NOMINMAX -#if defined(__APPLE__) -#include "ds4_os_apple.h" // the Linux calls below, on macOS -#endif #define NOMINMAX #endif #include