Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksejs Sestakovs <aleksejs.sestakovs@zabbix.com>2022-02-18 16:44:30 +0300
committerAleksejs Sestakovs <aleksejs.sestakovs@zabbix.com>2022-02-18 16:45:25 +0300
commitfb9fc67706d451a5020cf6f967c1f5e35020e8b4 (patch)
tree517eaec0e897742016015a9aaa122a97102a3dcc
parent7dfacee981a932b02d19d12b8353d9fd821291c4 (diff)
........S. [ZBX-20530] fixed compilation error on FreeBSD
* commit '02f0c2000aef27dcccce61a1e3502fac41bc1ea7': ........S. [ZBX-20530] fixed compilation error on FreeBSD (cherry picked from commit 92ce4a609e0c0bb51c664102ee4f71ee868dbf2a)
-rw-r--r--ChangeLog.d/bugfix/ZBX-205301
-rw-r--r--src/libs/zbxembed/zabbix.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog.d/bugfix/ZBX-20530 b/ChangeLog.d/bugfix/ZBX-20530
new file mode 100644
index 00000000000..85683d20006
--- /dev/null
+++ b/ChangeLog.d/bugfix/ZBX-20530
@@ -0,0 +1 @@
+........S. [ZBX-20530] fixed compilation error on FreeBSD (asestakovs)
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)