$NetBSD: patch-external_skia_netbsd.patch.0,v 1.4 2022/08/22 13:58:32 ryoon Exp $ * Support NetBSD. It has no uselocale(3). * Fix build failure (isnan etc. are not defined) under NetBSD/amd64 9.99.88 (GCC 10.3.0) at least. --- external/skia/netbsd.patch.0.orig 2022-08-19 00:29:47.661827273 +0000 +++ external/skia/netbsd.patch.0 @@ -0,0 +1,31 @@ +* Support NetBSD. It has no uselocale(3). +* Fix build failure (isnan etc. are not defined) under NetBSD/amd64 9.99.88 + (GCC 10.3.0) at least. + +--- src/gpu/ganesh/GrAutoLocaleSetter.h.orig 2022-08-19 00:39:34.308186035 +0000 ++++ src/gpu/ganesh/GrAutoLocaleSetter.h +@@ -27,7 +27,7 @@ + #define HAVE_XLOCALE 0 + #endif + +-#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) ++#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__NetBSD__) + #define HAVE_LOCALE_T 0 + #else + #define HAVE_LOCALE_T 1 +--- src/sksl/dsl/DSLExpression.cpp.orig 2022-08-19 00:40:37.794860287 +0000 ++++ src/sksl/dsl/DSLExpression.cpp +@@ -63,10 +63,10 @@ DSLExpression::DSLExpression(float value + : fExpression(SkSL::Literal::MakeFloat(ThreadContext::Context(), + pos, + value)) { +- if (!isfinite(value)) { +- if (isinf(value)) { ++ if (!std::isfinite(value)) { ++ if (std::isinf(value)) { + ThreadContext::ReportError("floating point value is infinite"); +- } else if (isnan(value)) { ++ } else if (std::isnan(value)) { + ThreadContext::ReportError("floating point value is NaN"); + } + }