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:
-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)