aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/magma/clang-cuda.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/magma/clang-cuda.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/magma/clang-cuda.patch')
-rw-r--r--vcpkg/ports/magma/clang-cuda.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/vcpkg/ports/magma/clang-cuda.patch b/vcpkg/ports/magma/clang-cuda.patch
new file mode 100644
index 0000000..2ff14ce
--- /dev/null
+++ b/vcpkg/ports/magma/clang-cuda.patch
@@ -0,0 +1,23 @@
+diff --git a/control/magma_internal.h b/control/magma_internal.h
+index 7af16a5..0133e44 100644
+--- a/control/magma_internal.h
++++ b/control/magma_internal.h
+@@ -33,7 +33,7 @@
+ // functions where Microsoft fails to provide C99 standard
+ // (only with Microsoft, not with nvcc on Windows)
+ // in both magma_internal.h and testings.h
+- #ifndef __NVCC__
++ #if !defined(__NVCC__) && !defined(__clang__)
+
+ #include <float.h>
+ #define copysign(x,y) _copysign(x,y)
+@@ -43,6 +43,9 @@
+ // note _snprintf has slightly different semantics than snprintf
+ #define snprintf _snprintf
+
++ #elif !defined(__NVCC__)
++ // make sure this actually uses the C version and not the C++ overloads
++ #define copysign(x,y) copysign((double)x,(double)y)
+ #endif
+
+ #else