diff options
| author | Michael Forney <mforney@mforney.org> | 2021-09-06 18:07:45 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2021-09-06 18:16:31 -0700 |
| commit | 25385fc1f69fe2ef22c6162c5048d0451a79b22d (patch) | |
| tree | 98e11f916b487d7f7e192eb1619759d5b9d03ca2 /pkg/util-linux/patch | |
| parent | 3ec2ee2d9d32734622aa1aff181f2dc0edb1ac2b (diff) | |
util-linux: Avoid use of long double
Diffstat (limited to 'pkg/util-linux/patch')
| -rw-r--r-- | pkg/util-linux/patch/0010-Avoid-use-of-long-double.patch | 44 |
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 + |
