summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-01-20 02:01:38 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-01-20 02:01:38 +0000
commit06615d889929f4aa3ce57b53c76fab2bf4853c78 (patch)
treeb4813503577c8ba3590b19e8d5b8de8e781e2db3
parent43f76dcf28c7595fda65a609f5653c42464e7f19 (diff)
parent42db4d19acb658d6dcd059a319a378c89c3df75a (diff)
downloaddng_sdk-06615d889929f4aa3ce57b53c76fab2bf4853c78.tar.gz
Snap for 8096610 from 42db4d19acb658d6dcd059a319a378c89c3df75a to sdk-releaseplatform-tools-33.0.1platform-tools-33.0.0
Change-Id: I448ea70cbfc2806203f2decafaf09afc8f81a98f
-rw-r--r--source/dng_safe_arithmetic.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/dng_safe_arithmetic.h b/source/dng_safe_arithmetic.h
index b229dc4..66c5ebf 100644
--- a/source/dng_safe_arithmetic.h
+++ b/source/dng_safe_arithmetic.h
@@ -20,6 +20,7 @@
#ifndef __dng_safe_arithmetic__
#define __dng_safe_arithmetic__
+#include <climits>
#include <cstddef>
#include <cstdint>
#include <limits>
@@ -112,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 (__WORDSIZE == 64) && !defined(__APPLE__)
+#if LONG_MAX == INT64_MAX
if (__builtin_smull_overflow(arg1, arg2, &result)) {
#else
if (__builtin_smulll_overflow(arg1, arg2, &result)) {