Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame^] | 1 | From 8c317f0fd5fde95a9aae2319053a196a166aec88 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 25 Jan 2023 21:12:47 -0800 |
| 4 | Subject: [PATCH] include standard headers <limits> and <cstdint> |
| 5 | |
| 6 | gcc 13 moved some includes around and as a result <cstdint> is no longer |
| 7 | transitively included [1]. Explicitly include it for uint64_t. |
| 8 | |
| 9 | Fixes errors like below |
| 10 | |
| 11 | ../rdfind-1.5.0/rdfind.cc:225:30: error: 'numeric_limits' is not a member of 'std' |
| 12 | 225 | o.maximumfilesize = std::numeric_limits<decltype(o.maximumfilesize)>::max(); |
| 13 | | ^~~~~~~~~~~~~~ |
| 14 | |
| 15 | ... |
| 16 | |
| 17 | | ../rdfind-1.5.0/Fileinfo.hh:70:20: error: 'std::int64_t' has not been declared |
| 18 | |
| 19 | [1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes |
| 20 | |
| 21 | Upstream-Status: Submitted [https://github.com/pauldreik/rdfind/pull/129] |
| 22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 23 | --- |
| 24 | Fileinfo.hh | 1 + |
| 25 | rdfind.cc | 1 + |
| 26 | 2 files changed, 2 insertions(+) |
| 27 | |
| 28 | diff --git a/Fileinfo.hh b/Fileinfo.hh |
| 29 | index 3ffb837..23ed54e 100644 |
| 30 | --- a/Fileinfo.hh |
| 31 | +++ b/Fileinfo.hh |
| 32 | @@ -8,6 +8,7 @@ |
| 33 | #define Fileinfo_hh |
| 34 | |
| 35 | #include <array> |
| 36 | +#include <cstdint> |
| 37 | #include <string> |
| 38 | |
| 39 | // os specific headers |
| 40 | diff --git a/rdfind.cc b/rdfind.cc |
| 41 | index fbd6cb8..64dd8f6 100644 |
| 42 | --- a/rdfind.cc |
| 43 | +++ b/rdfind.cc |
| 44 | @@ -9,6 +9,7 @@ |
| 45 | // std |
| 46 | #include <algorithm> |
| 47 | #include <iostream> |
| 48 | +#include <limits> |
| 49 | #include <string> |
| 50 | #include <vector> |
| 51 | |
| 52 | -- |
| 53 | 2.39.1 |
| 54 | |