summaryrefslogtreecommitdiff
path: root/pkg/util-linux/patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/util-linux/patch')
-rw-r--r--pkg/util-linux/patch/0010-Avoid-use-of-long-double.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkg/util-linux/patch/0010-Avoid-use-of-long-double.patch b/pkg/util-linux/patch/0010-Avoid-use-of-long-double.patch
new file mode 100644
index 00000000..61c198c4
--- /dev/null
+++ b/pkg/util-linux/patch/0010-Avoid-use-of-long-double.patch
@@ -0,0 +1,44 @@
+From d9162eab76d43c1cbd289665c1b02a7e062a2017 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Mon, 6 Sep 2021 18:05:22 -0700
+Subject: [PATCH] Avoid use of long double
+
+---
+ lib/strutils.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/strutils.c b/lib/strutils.c
+index 5b5e686aa..ac1a0f527 100644
+--- a/lib/strutils.c
++++ b/lib/strutils.c
+@@ -459,6 +459,7 @@ err:
+ errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str);
+ }
+
++#if 0
+ long double strtold_or_err(const char *str, const char *errmesg)
+ {
+ double num;
+@@ -479,6 +480,7 @@ err:
+
+ errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str);
+ }
++#endif
+
+ long strtol_or_err(const char *str, const char *errmesg)
+ {
+@@ -538,9 +540,9 @@ uintmax_t strtosize_or_err(const char *str, const char *errmesg)
+
+ void strtotimeval_or_err(const char *str, struct timeval *tv, const char *errmesg)
+ {
+- long double user_input;
++ double user_input;
+
+- user_input = strtold_or_err(str, errmesg);
++ user_input = strtod_or_err(str, errmesg);
+ tv->tv_sec = (time_t) user_input;
+ tv->tv_usec = (suseconds_t)((user_input - tv->tv_sec) * 1000000);
+ }
+--
+2.32.0
+