From fb9fc67706d451a5020cf6f967c1f5e35020e8b4 Mon Sep 17 00:00:00 2001 From: Aleksejs Sestakovs Date: Fri, 18 Feb 2022 15:44:30 +0200 Subject: ........S. [ZBX-20530] fixed compilation error on FreeBSD * commit '02f0c2000aef27dcccce61a1e3502fac41bc1ea7': ........S. [ZBX-20530] fixed compilation error on FreeBSD (cherry picked from commit 92ce4a609e0c0bb51c664102ee4f71ee868dbf2a) --- src/libs/zbxembed/zabbix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs/zbxembed/zabbix.c') diff --git a/src/libs/zbxembed/zabbix.c b/src/libs/zbxembed/zabbix.c index 86ad4a7ecf3..820768f1924 100644 --- a/src/libs/zbxembed/zabbix.c +++ b/src/libs/zbxembed/zabbix.c @@ -141,7 +141,7 @@ static duk_ret_t es_zabbix_sleep(duk_context *ctx) /* use duk_to_number() instead of duk_to_uint() to distinguish between zero value and error */ sleep_dbl = duk_to_number(ctx, 0); - if (0 != DUK_ISNAN((float)sleep_dbl) || 0.0 > sleep_dbl) + if (FP_NAN == fpclassify((float)sleep_dbl) || 0.0 > sleep_dbl) return duk_error(ctx, DUK_ERR_EVAL_ERROR, "invalid Zabbix.sleep() duration"); if (DUK_UINT_MAX < sleep_dbl) -- cgit v1.2.3