$NetBSD: patch-external_skia_netbsd.patch.0,v 1.3 2022/02/05 04:53:43 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-02-03 04:24:23.011640283 +0000 +++ external/skia/netbsd.patch.0 @@ -0,0 +1,29 @@ +diff -ur skia.orig/src/gpu/GrAutoLocaleSetter.h skia/src/gpu/GrAutoLocaleSetter.h +--- src/gpu/GrAutoLocaleSetter.h 2019-09-19 18:38:01.127185317 +0900 ++++ src/gpu/GrAutoLocaleSetter.h 2022-02-03 13:25:31.192362952 +0900 +@@ -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 +diff -ur skia.orig/src/sksl/dsl/DSLExpression.cpp skia/src/sksl/dsl/DSLExpression.cpp +--- src/sksl/dsl/DSLExpression.cpp 2021-11-26 00:00:28.260475275 +0900 ++++ src/sksl/dsl/DSLExpression.cpp 2022-02-03 13:26:31.790025246 +0900 +@@ -45,10 +45,10 @@ + : fExpression(SkSL::Literal::MakeFloat(ThreadContext::Context(), + pos.line(), + 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"); + } + }