void-packages/srcpkgs/godot/patches/10-fix-musl.patch

28 lines
983 B
Diff

--- joystick_linux.cpp 2017-12-12 21:28:08.263329050 +0100
+++ platform/x11/joypad_linux.cpp 2017-12-12 21:29:25.500336429 +0100
@@ -42,6 +42,10 @@
#include <libudev.h>
#endif
+#if !defined(__GLIBC__)
+#include <byteswap.h>
+#endif
+
#define LONG_BITS (sizeof(long) * 8)
#define test_bit(nr, addr) (((1UL << ((nr) % LONG_BITS)) & ((addr)[(nr) / LONG_BITS])) != 0)
#define NBITS(x) ((((x)-1) / LONG_BITS) + 1)
diff --git thirdparty/thekla_atlas/nvmath/nvmath.h thirdparty/thekla_atlas/nvmath/nvmath.h
index f2b6942..5b15bd1 100644
--- thirdparty/thekla_atlas/nvmath/nvmath.h
+++ thirdparty/thekla_atlas/nvmath/nvmath.h
@@ -196,7 +196,7 @@ namespace nv
{
#if NV_OS_WIN32 || NV_OS_XBOX || NV_OS_DURANGO
return _isnan(f) != 0;
-#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD || NV_OS_ORBIS
+#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD || NV_OS_ORBIS || !defined(__GLIBC__)
return isnan(f);
#elif NV_OS_LINUX
return isnanf(f);