linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
0010-Avoid-use-of-long-double.patch
(1154B)
1 From d9162eab76d43c1cbd289665c1b02a7e062a2017 Mon Sep 17 00:00:00 2001
2 From: Michael Forney <mforney@mforney.org>
3 Date: Mon, 6 Sep 2021 18:05:22 -0700
4 Subject: [PATCH] Avoid use of long double
5
6 ---
7 lib/strutils.c | 6 ++++--
8 1 file changed, 4 insertions(+), 2 deletions(-)
9
10 diff --git a/lib/strutils.c b/lib/strutils.c
11 index 5b5e686aa..ac1a0f527 100644
12 --- a/lib/strutils.c
13 +++ b/lib/strutils.c
14 @@ -459,6 +459,7 @@ err:
15 errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str);
16 }
17
18 +#if 0
19 long double strtold_or_err(const char *str, const char *errmesg)
20 {
21 double num;
22 @@ -479,6 +480,7 @@ err:
23
24 errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str);
25 }
26 +#endif
27
28 long strtol_or_err(const char *str, const char *errmesg)
29 {
30 @@ -538,9 +540,9 @@ uintmax_t strtosize_or_err(const char *str, const char *errmesg)
31
32 void strtotimeval_or_err(const char *str, struct timeval *tv, const char *errmesg)
33 {
34 - long double user_input;
35 + double user_input;
36
37 - user_input = strtold_or_err(str, errmesg);
38 + user_input = strtod_or_err(str, errmesg);
39 tv->tv_sec = (time_t) user_input;
40 tv->tv_usec = (suseconds_t)((user_input - tv->tv_sec) * 1000000);
41 }
42 --
43 2.32.0
44