From 19da2fba83fe629da6ca872a44bd97565c80bd5f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 30 Aug 2023 16:32:58 +0200 Subject: [PATCH] Fix macOS Arm build of OSL library dependency This patch is already in upstream, so this is temporary until we upgrade to the latest OSL version. Ref #110708 --- .../build_environment/patches/osl.diff | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/build_files/build_environment/patches/osl.diff b/build_files/build_environment/patches/osl.diff index 032303c5ca7..46539a7d1da 100644 --- a/build_files/build_environment/patches/osl.diff +++ b/build_files/build_environment/patches/osl.diff @@ -90,3 +90,24 @@ index 6bb0d175..19f13513 100644 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS" ) +diff --git a/src/include/OSL/mask.h b/src/include/OSL/mask.h +index 24197af..b9275f6 100644 +--- a/src/include/OSL/mask.h ++++ b/src/include/OSL/mask.h +@@ -4,7 +4,6 @@ + + #pragma once + +-#include + #include + + #include +@@ -23,6 +22,8 @@ using std::countr_zero; + + #elif OSL_INTEL_CLASSIC_COMPILER_VERSION + ++#include ++ + OSL_FORCEINLINE int popcount(uint32_t x) noexcept { return _mm_popcnt_u32(x);} + OSL_FORCEINLINE int popcount(uint64_t x) noexcept { return _mm_popcnt_u64(x); } + OSL_FORCEINLINE int countr_zero(uint32_t x) noexcept { return _bit_scan_forward(x); }