From 3b0f642de9fef3bac3ef98d8bcecdbdfb81e945b Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 24 Nov 2019 12:40:03 -0800 Subject: [PATCH] builtin-math: Use normal C trunc uClibc-ng does not expose C++11 math functions to the std namespace, breaking compilation. This is fine as the argument type is double. Signed-off-by: Rosen Penev --- src/builtin_math.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/builtin_math.cpp b/src/builtin_math.cpp index 611c29141..f8e579db8 100644 --- a/src/builtin_math.cpp +++ b/src/builtin_math.cpp @@ -163,7 +163,7 @@ static wcstring format_double(double v, const math_cmd_opts_t &opts) { // As a special-case, a scale of 0 means to truncate to an integer // instead of rounding. if (opts.scale == 0) { - v = std::trunc(v); + v = trunc(v); return format_string(L"%.*f", opts.scale, v); }