From 7f10fa9768b3774ec1fec7fd0f0e77726fcecc13 Mon Sep 17 00:00:00 2001 From: morrySnow <101034200+morrySnow@users.noreply.github.com> Date: Mon, 5 Sep 2022 08:28:51 +0800 Subject: [PATCH] [fix](compile)compile error when use clang on aarch64 platform (#12319) --- be/src/geo/geo_types.cpp | 2 +- be/src/glibc-compatibility/memcpy/memcpy_aarch64.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/be/src/geo/geo_types.cpp b/be/src/geo/geo_types.cpp index f44ac66559..3a0ab43ee0 100644 --- a/be/src/geo/geo_types.cpp +++ b/be/src/geo/geo_types.cpp @@ -52,7 +52,7 @@ void print_s2point(std::ostream& os, const S2Point& point) { } static inline bool is_valid_lng_lat(double lng, double lat) { - return abs(lng) <= 180 && abs(lat) <= 90; + return std::abs(lng) <= 180 && std::abs(lat) <= 90; } // Return GEO_PARSE_OK, if and only if this can be converted to a valid S2Point diff --git a/be/src/glibc-compatibility/memcpy/memcpy_aarch64.cpp b/be/src/glibc-compatibility/memcpy/memcpy_aarch64.cpp index 4a6a5ac96f..b62aa26303 100644 --- a/be/src/glibc-compatibility/memcpy/memcpy_aarch64.cpp +++ b/be/src/glibc-compatibility/memcpy/memcpy_aarch64.cpp @@ -22,11 +22,6 @@ static inline __attribute__((always_inline)) __m128i _mm_loadu_si128(const __m12 return vreinterpretq_m128i_s32(vld1q_s32((const int32_t *) p)); } -static inline __attribute__((always_inline)) __m128i _mm_load_si128(const __m128i *p) -{ - return vreinterpretq_m128i_s32(vld1q_s32((const int32_t *) p)); -} - /** Custom memcpy implementation for ClickHouse. * It has the following benefits over using glibc's implementation: * 1. Avoiding dependency on specific version of glibc's symbol, like memcpy@@GLIBC_2.14 for portability.