]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
ccache: Fix build with gcc12 on musl
authorKhem Raj <raj.khem@gmail.com>
Tue, 23 Aug 2022 18:01:50 +0000 (11:01 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Aug 2022 10:07:33 +0000 (11:07 +0100)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/ccache/ccache_4.6.1.bb
meta/recipes-devtools/ccache/files/0001-Include-time.h-for-time_t.patch [new file with mode: 0644]

index 0d6471ddbcb63e2f9e2cbb5a5be0f49149f7c284..716aec058434120bbaa68475e9bce31347dc8acd 100644 (file)
@@ -13,6 +13,7 @@ DEPENDS = "zstd"
 
 SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz \
            file://0001-xxhash.h-Fix-build-with-gcc-12.patch \
+           file://0001-Include-time.h-for-time_t.patch \
 "
 SRC_URI[sha256sum] = "59b28a57c3a45e48d6049001999c9f94cd4d3e9b0196994bed9a6a7437ffa3bc"
 
diff --git a/meta/recipes-devtools/ccache/files/0001-Include-time.h-for-time_t.patch b/meta/recipes-devtools/ccache/files/0001-Include-time.h-for-time_t.patch
new file mode 100644 (file)
index 0000000..6c1d3cf
--- /dev/null
@@ -0,0 +1,31 @@
+From 3d3364221c235c733436abaeeea9b5e6813b06ae Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 23 Aug 2022 10:27:21 -0700
+Subject: [PATCH] Include time.h for time_t
+
+Fixes
+src/core/Statistics.hpp:41:37: error: 'time_t' has not been declared
+|    41 |                                     time_t last_updated,
+|       |                                     ^~~~~~
+
+Upstream-Status: Submitted [https://github.com/ccache/ccache/pull/1145]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/core/Statistics.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/core/Statistics.hpp b/src/core/Statistics.hpp
+index 3e9ed816..0017f209 100644
+--- a/src/core/Statistics.hpp
++++ b/src/core/Statistics.hpp
+@@ -20,6 +20,7 @@
+ #include <core/StatisticsCounters.hpp>
++#include <ctime>
+ #include <string>
+ #include <unordered_map>
+ #include <vector>
+-- 
+2.37.2
+