From 7c6e714f188f9576e25e0350cac4181139eec23e Mon Sep 17 00:00:00 2001 From: vegetableysm <108774481+vegetableysm@users.noreply.github.com> Date: Fri, 28 Mar 2025 09:33:53 +0800 Subject: [PATCH] Fix uint64_t type error with gcc 13.3. (#299) Etcd compiles successfully using gcc version 9.4.0, but fails when using version 13.3.0. ![image](https://github.com/user-attachments/assets/050723ea-1b09-4d99-abb5-06c9b59e153a) The reason why gcc works with version 9.4.0 is that the \ include the \ that already include \. ![image](https://github.com/user-attachments/assets/3bf2a72a-b997-4341-a820-48acda360899) However, in version 13.3.0 of gcc, the \ header file conditionally includes cstdint ![image](https://github.com/user-attachments/assets/490f2102-7d99-4cf4-8696-f3c0d7528fb9) Therefore, including \ in Member.hpp is able to solve this problem, which is also in line with the principle of include-what-you-use. Related issue: #297 Signed-off-by: vegetableysm --- etcd/v3/Member.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/etcd/v3/Member.hpp b/etcd/v3/Member.hpp index 057899d..5260d21 100644 --- a/etcd/v3/Member.hpp +++ b/etcd/v3/Member.hpp @@ -1,6 +1,7 @@ #ifndef __V3_ETCDV3MEMBERS_HPP__ #define __V3_ETCDV3MEMBERS_HPP__ +#include #include #include using namespace std;