From 6474f2593428d89ec152da2502aa136ababe66ca Mon Sep 17 00:00:00 2001 From: leper Date: Wed, 16 Jan 2019 23:00:07 +0100 Subject: [PATCH 1/2] Don't include sys/sysctl.h on Linux. Not only is sysctl() not used on this platform, but musl libc does not have the header. --- src/nvthread/nvthread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nvthread/nvthread.cpp b/src/nvthread/nvthread.cpp index b727f2e..866593d 100644 --- a/src/nvthread/nvthread.cpp +++ b/src/nvthread/nvthread.cpp @@ -8,7 +8,9 @@ #include "Win32.h" #elif NV_OS_UNIX #include +#if !NV_OS_LINUX #include +#endif #include #elif NV_OS_DARWIN #import From 99bcaf719c395ab1983951bb628eeb785e5c21c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=96R=C3=96SK=C5=90I=20Andr=C3=A1s?= Date: Thu, 20 Feb 2020 10:22:34 +0100 Subject: [PATCH 2/2] Use isnan() instead of isnanf() on linux isnanf() is deprecated since C99 --- src/nvmath/nvmath.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nvmath/nvmath.h b/src/nvmath/nvmath.h index 259ab63..a66aea1 100644 --- a/src/nvmath/nvmath.h +++ b/src/nvmath/nvmath.h @@ -185,10 +185,8 @@ namespace nv { #if NV_OS_WIN32 || NV_OS_XBOX return _isnan(f) != 0; -#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_NETBSD || NV_OS_OPENBSD || NV_OS_ORBIS +#elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_NETBSD || NV_OS_OPENBSD || NV_OS_ORBIS || NV_OS_LINUX return isnan(f); -#elif NV_OS_LINUX - return isnanf(f); #else # error "isNan not supported" #endif