Browse Source

fix stuff

lizzie/ios-port-sud
lizzie 1 week ago
parent
commit
e7717708f1
  1. 2
      .ci/ios/build.sh
  2. 3
      src/common/device_power_state.cpp
  3. 10
      src/common/host_memory.cpp

2
.ci/ios/build.sh

@ -15,6 +15,8 @@ cmake -G Xcode -B build \
-DPLATFORM=OS64 \ -DPLATFORM=OS64 \
-DDEPLOYMENT_TARGET=16.0 \ -DDEPLOYMENT_TARGET=16.0 \
-DCOCOA_LIBRARY="$IOS_SDK/System/Library/Frameworks/Cocoa.framework" \ -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_LIBUSB=OFF \
-DENABLE_UPDATE_CHECKER=OFF \ -DENABLE_UPDATE_CHECKER=OFF \
-DENABLE_QT=OFF \ -DENABLE_QT=OFF \

3
src/common/device_power_state.cpp

@ -14,11 +14,10 @@ extern std::atomic<bool> g_has_battery;
#elif defined(__APPLE__) #elif defined(__APPLE__)
#include <TargetConditionals.h> #include <TargetConditionals.h>
#if TARGET_OS_MAC
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
#include <IOKit/ps/IOPSKeys.h> #include <IOKit/ps/IOPSKeys.h>
#include <IOKit/ps/IOPowerSources.h> #include <IOKit/ps/IOPowerSources.h>
#endif #endif
#elif defined(__linux__) #elif defined(__linux__)
#include <fstream> #include <fstream>
#include <string> #include <string>

10
src/common/host_memory.cpp

@ -27,14 +27,14 @@
#include <sys/random.h> #include <sys/random.h>
#elif defined(__APPLE__) #elif defined(__APPLE__)
#include <sys/types.h> #include <sys/types.h>
#include <mach/vm_map.h>
#include <mach/mach.h>
#endif
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
// Not available on iOS for some fucking stupid reason... // Not available on iOS for some fucking stupid reason...
#if defined(__APPLE__) && TARGET_OS_MAC
#else
#include <sys/random.h> #include <sys/random.h>
#endif #endif
#include <mach/vm_map.h>
#include <mach/mach.h>
#endif
// FreeBSD // FreeBSD
#ifndef MAP_NORESERVE #ifndef MAP_NORESERVE

Loading…
Cancel
Save