You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from ../deps/v8/include/v8-platform.h:8,
from ../src/tracing/traced_value.h:8,
from ../src/tracing/traced_value.cc:5:
../src/tracing/traced_value.cc: In function 'std::string node::tracing::{anonymous}::DoubleToCString(double)':
../src/tracing/traced_value.cc:90:33: error: expected unqualified-id before '(' token
90 | switch (FPCLASSIFY_NAMESPACE::fpclassify(v)) {
| ^~~~~~~~~~
The problem is that fpclassify is a macro in math.h:
--- src/tracing/traced_value.cc.orig 2025-09-01 20:45:44.230556337 +0000
+++ src/tracing/traced_value.cc
@@ -87,7 +87,11 @@ std::string EscapeString(const char* val
}
std::string DoubleToCString(double v) {
+#if defined(__NetBSD__)
+ switch (fpclassify(v)) {
+#else
switch (FPCLASSIFY_NAMESPACE::fpclassify(v)) {
+#endif
case FP_NAN: return "\"NaN\"";
case FP_INFINITE: return (v < 0.0 ? "\"-Infinity\"" : "\"Infinity\"");
case FP_ZERO: return "0";
Adding || defined(NetBSD) to the FPCLASSIFY_NAMESPACE definition block at the top doesn't work because then it's still ::fpclassify which won't work with the macro.
If this is not allowed to be a macro and I should file a bug report with NetBSD, please let me know.
Thanks!
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?