diff options
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/patches/32-bit-casts.patch | 30 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 37 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index bda907f..32a2429 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -1,3 +1,9 @@ | |||
1 | libfido2 (1.5.0-2) UNRELEASED; urgency=medium | ||
2 | |||
3 | * Cherry-pick upstream patch to fix 32-bit build errors. | ||
4 | |||
5 | -- Colin Watson <cjwatson@debian.org> Sun, 20 Sep 2020 22:57:17 +0100 | ||
6 | |||
1 | libfido2 (1.5.0-1) unstable; urgency=medium | 7 | libfido2 (1.5.0-1) unstable; urgency=medium |
2 | 8 | ||
3 | * New upstream release. | 9 | * New upstream release. |
diff --git a/debian/patches/32-bit-casts.patch b/debian/patches/32-bit-casts.patch new file mode 100644 index 0000000..cb11235 --- /dev/null +++ b/debian/patches/32-bit-casts.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From: pedro martelletto <pedro@ambientworks.net> | ||
2 | Date: Sun, 20 Sep 2020 22:56:30 +0100 | ||
3 | Subject: add two casts to silence warnings on 32-bit | ||
4 | |||
5 | add two casts to silence 'comparison is always false' warnings on | ||
6 | 32-bit platforms (gcc: -Werror=type-limits, clang: | ||
7 | -Wtautological-constant-out-of-range-compare); gh#210 | ||
8 | |||
9 | Origin: upstream, https://github.com/Yubico/libfido2/commit/7a17a4e9127fb6df6278f19396760e7d60a5862c | ||
10 | Bug: https://github.com/Yubico/libfido2/issues/210 | ||
11 | Last-Update: 2020-09-20 | ||
12 | --- | ||
13 | src/hid_linux.c | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/src/hid_linux.c b/src/hid_linux.c | ||
17 | index 9788012..c554784 100644 | ||
18 | --- a/src/hid_linux.c | ||
19 | +++ b/src/hid_linux.c | ||
20 | @@ -385,8 +385,8 @@ timespec_to_ms(const struct timespec *ts, int upper_bound) | ||
21 | int64_t x; | ||
22 | int64_t y; | ||
23 | |||
24 | - if (ts->tv_sec < 0 || ts->tv_sec > INT64_MAX / 1000LL || | ||
25 | - ts->tv_nsec < 0 || ts->tv_nsec / 1000000LL > INT64_MAX) | ||
26 | + if (ts->tv_sec < 0 || (uint64_t)ts->tv_sec > INT64_MAX / 1000LL || | ||
27 | + ts->tv_nsec < 0 || (uint64_t)ts->tv_nsec / 1000000LL > INT64_MAX) | ||
28 | return (upper_bound); | ||
29 | |||
30 | x = ts->tv_sec * 1000LL; | ||
diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..75078d5 --- /dev/null +++ b/debian/patches/series | |||
@@ -0,0 +1 @@ | |||
32-bit-casts.patch | |||