From 117aa35094c059dbf5770b01ac13a583471e54aa Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 26 Jun 2016 01:02:03 +0800 Subject: [PATCH] common: instantiate strict_si_cast not strict_si_cast this fixes the build on armf. on 32bit platforms, cstdint is very likely to typedef long long int int64_t; this results in compilation error like `common/strtol.cc:190:75: error: duplicate explicit instantiation of 'T strict_si_cast(const char, std::string) [with T = long long int; std::string = std::basic_string]' [-fpermissive] template int64_t strict_si_cast(const char *str, std::string *err); ^` we can address this by instantiate the primitive type of `long long` instead of `in64_t`. Fixes: http://tracker.ceph.com/issues/16398 Signed-off-by: Kefu Chai (cherry picked from commit 31db4c5f9f725e13e38f3c90744e299e023d02a4) --- src/common/strtol.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/strtol.cc b/src/common/strtol.cc index 0e7ea7d301147..321521d1f2df4 100644 --- a/src/common/strtol.cc +++ b/src/common/strtol.cc @@ -186,8 +186,8 @@ T strict_si_cast(const char *str, std::string *err) } template int strict_si_cast(const char *str, std::string *err); +template long strict_si_cast(const char *str, std::string *err); template long long strict_si_cast(const char *str, std::string *err); -template int64_t strict_si_cast(const char *str, std::string *err); template uint64_t strict_si_cast(const char *str, std::string *err); template uint32_t strict_si_cast(const char *str, std::string *err); -- 2.39.5