diff --git a/src/fallback.cpp b/src/fallback.cpp index bcfc4d926..4826426b9 100644 --- a/src/fallback.cpp +++ b/src/fallback.cpp @@ -389,7 +389,7 @@ int flock(int fd, int op) { #endif // HAVE_FLOCK -#ifndef HAVE_WCSTOD_L +#if !defined(HAVE_WCSTOD_L) && !defined(__NetBSD__) #undef wcstod_l // For platforms without wcstod_l C extension, wrap wcstod after changing the // thread-specific locale. diff --git a/src/fallback.h b/src/fallback.h index 0a94c2b5f..62422f923 100644 --- a/src/fallback.h +++ b/src/fallback.h @@ -199,7 +199,10 @@ int flock(int fd, int op); #endif -#ifndef HAVE_WCSTOD_L +// NetBSD _has_ wcstod_l, but it's doing some weak linking hullabaloo that I don't get. +// Since it doesn't have uselocale (yes, the standard function isn't there, the non-standard extension is), +// we can't try to use the fallback. +#if !defined(HAVE_WCSTOD_L) && !defined(__NetBSD__) // On some platforms if this is incorrectly detected and a system-defined // defined version of `wcstod_l` exists, calling `wcstod` from our own // `wcstod_l` can call back into `wcstod_l` causing infinite recursion.