summaryrefslogtreecommitdiff
path: root/pkg/zfs/patch/0008-Avoid-use-of-long-double-function.patch
blob: ea4ca5a9b830b60e44f7369c2715a6ea00742359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 36c4199b3392557bffc375444696bdc6ec36ebae Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sat, 21 Jan 2023 17:30:39 -0800
Subject: [PATCH] Avoid use of long double function

---
 lib/libzutil/zutil_nicenum.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libzutil/zutil_nicenum.c b/lib/libzutil/zutil_nicenum.c
index 4dcac1f85..5bde425f4 100644
--- a/lib/libzutil/zutil_nicenum.c
+++ b/lib/libzutil/zutil_nicenum.c
@@ -102,7 +102,7 @@ zfs_nicenum_format(uint64_t num, char *buf, size_t buflen,
 	if ((format == ZFS_NICENUM_TIME) && (num == 0)) {
 		(void) snprintf(buf, buflen, "-");
 	} else if ((index == 0) || ((num %
-	    (uint64_t)powl(k_unit[format], index)) == 0)) {
+	    (uint64_t)pow(k_unit[format], index)) == 0)) {
 		/*
 		 * If this is an even multiple of the base, always display
 		 * without any decimal precision.
@@ -122,7 +122,7 @@ zfs_nicenum_format(uint64_t num, char *buf, size_t buflen,
 		int i;
 		for (i = 2; i >= 0; i--) {
 			val = (double)num /
-			    (uint64_t)powl(k_unit[format], index);
+			    (uint64_t)pow(k_unit[format], index);
 
 			/*
 			 * Don't print floating point values for time.  Note,
-- 
2.37.3