rdfind: Fix build with gcc13

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2023-01-25 21:18:52 -08:00
parent cbd762fafc
commit df99d60370
2 changed files with 55 additions and 0 deletions
@@ -0,0 +1,54 @@
From 8c317f0fd5fde95a9aae2319053a196a166aec88 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 25 Jan 2023 21:12:47 -0800
Subject: [PATCH] include standard headers <limits> and <cstdint>
gcc 13 moved some includes around and as a result <cstdint> is no longer
transitively included [1]. Explicitly include it for uint64_t.
Fixes errors like below
../rdfind-1.5.0/rdfind.cc:225:30: error: 'numeric_limits' is not a member of 'std'
225 | o.maximumfilesize = std::numeric_limits<decltype(o.maximumfilesize)>::max();
| ^~~~~~~~~~~~~~
...
| ../rdfind-1.5.0/Fileinfo.hh:70:20: error: 'std::int64_t' has not been declared
[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
Upstream-Status: Submitted [https://github.com/pauldreik/rdfind/pull/129]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Fileinfo.hh | 1 +
rdfind.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/Fileinfo.hh b/Fileinfo.hh
index 3ffb837..23ed54e 100644
--- a/Fileinfo.hh
+++ b/Fileinfo.hh
@@ -8,6 +8,7 @@
#define Fileinfo_hh
#include <array>
+#include <cstdint>
#include <string>
// os specific headers
diff --git a/rdfind.cc b/rdfind.cc
index fbd6cb8..64dd8f6 100644
--- a/rdfind.cc
+++ b/rdfind.cc
@@ -9,6 +9,7 @@
// std
#include <algorithm>
#include <iostream>
+#include <limits>
#include <string>
#include <vector>
--
2.39.1
@@ -7,6 +7,7 @@ DEPENDS = "nettle autoconf-archive"
SRC_URI = "https://rdfind.pauldreik.se/${BP}.tar.gz \
file://0001-configure-Fix-check-for-AC_CHECK_LIB.patch \
file://0001-include-standard-headers-limits-and-cstdint.patch \
"
SRC_URI[sha256sum] = "4150ed1256f7b12b928c65113c485761552b9496c433778aac3f9afc3e767080"