From e7717708f13cc4d53a31711a4c69a31d4e0cc69b Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 23 Feb 2026 05:24:15 +0000 Subject: [PATCH] fix stuff --- .ci/ios/build.sh | 2 ++ src/common/device_power_state.cpp | 3 +-- src/common/host_memory.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.ci/ios/build.sh b/.ci/ios/build.sh index ca37ce9da2..2f15472178 100755 --- a/.ci/ios/build.sh +++ b/.ci/ios/build.sh @@ -15,6 +15,8 @@ cmake -G Xcode -B build \ -DPLATFORM=OS64 \ -DDEPLOYMENT_TARGET=16.0 \ -DCOCOA_LIBRARY="$IOS_SDK/System/Library/Frameworks/Cocoa.framework" \ + -DCMAKE_C_COMPILER="$(xcrun --sdk iphoneos clang -arch arm64)" \ + -DCMAKE_CXX_COMPILER="$(xcrun --sdk iphoneos clang++ -arch arm64)" \ -DENABLE_LIBUSB=OFF \ -DENABLE_UPDATE_CHECKER=OFF \ -DENABLE_QT=OFF \ diff --git a/src/common/device_power_state.cpp b/src/common/device_power_state.cpp index 2dfa7dc305..8419434ef2 100644 --- a/src/common/device_power_state.cpp +++ b/src/common/device_power_state.cpp @@ -14,11 +14,10 @@ extern std::atomic g_has_battery; #elif defined(__APPLE__) #include -#if TARGET_OS_MAC +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC #include #include #endif - #elif defined(__linux__) #include #include diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index d31ec5f224..e680006b8f 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -27,14 +27,14 @@ #include #elif defined(__APPLE__) #include -#include -#include -#endif - +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE // Not available on iOS for some fucking stupid reason... -#if defined(__APPLE__) && TARGET_OS_MAC +#else #include #endif +#include +#include +#endif // FreeBSD #ifndef MAP_NORESERVE