diff options
author | Jerome Gaillard <jgaillard@google.com> | 2022-01-20 13:22:43 +0000 |
---|---|---|
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | 2023-02-21 12:02:39 +0000 |
commit | 679499cc9b92cfb0ae1dccbfd7e97ce719d23576 (patch) | |
tree | 0c90eb3c77656b536cf21a9c4858dd6a035f597e | |
parent | 9e82d305b938c9aefd2e9ebc0b20b626d89c49f8 (diff) | |
download | dng_sdk-android14-qpr2-s4-release.tar.gz |
Fix build of dng_sdk for macOSandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
On mac, long and long long are of the same size, but int64_t is specifically defined as a long long.
Bug: N/A
Change-Id: Ib25cec45621c4eefc703de5f5e43b16dc0a010a3
Test: on a mac, lunch sdk & m libdng_sdk
(cherry picked from commit 1e1c945266845332b99d04a375729eee99826e22)
Merged-In: Ib25cec45621c4eefc703de5f5e43b16dc0a010a3
-rw-r--r-- | source/dng_safe_arithmetic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/dng_safe_arithmetic.h b/source/dng_safe_arithmetic.h index 66c5ebf..268c918 100644 --- a/source/dng_safe_arithmetic.h +++ b/source/dng_safe_arithmetic.h @@ -113,7 +113,7 @@ std::int64_t SafeInt64MultSlow(std::int64_t arg1, std::int64_t arg2); #if __has_builtin(__builtin_smull_overflow) inline std::int64_t SafeInt64MultByClang(std::int64_t arg1, std::int64_t arg2) { std::int64_t result; -#if LONG_MAX == INT64_MAX +#if (LONG_MAX == INT64_MAX) && !defined(__APPLE__) if (__builtin_smull_overflow(arg1, arg2, &result)) { #else if (__builtin_smulll_overflow(arg1, arg2, &result)) { |