From 48b6f7615922b326e8a0f5ca4a83a6a5d6a97b40 Mon Sep 17 00:00:00 2001 From: Jens Alfke Date: Fri, 10 Apr 2020 11:40:58 -0700 Subject: [PATCH] mdbx: Don't include on Apple platforms (#94) A simpler fix for the issue of this header being missing on iOS. It's not actually needed at all on Mach-based OSs. Fixes https://github.com/erthink/libmdbx/issues/92 --- src/elements/osal.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/elements/osal.h b/src/elements/osal.h index 453c3ca9..56ce5e58 100644 --- a/src/elements/osal.h +++ b/src/elements/osal.h @@ -90,26 +90,9 @@ #else #define SYSCTL_LEGACY_NONCONST_MIB #endif -#if defined(__APPLE__) && !__has_include() -#warning "The header is missing in iOS SDK. " \ - "Copy it manually from the OSX SDK or iPhoneSimulator SDK. " \ - "Don't forget to thank Apple for taking care of you!" -/*** FOR INSTANCE: - $ xcode-select --install - $ sudo installer -pkg - /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg - -target $ cd - $ sudo cp - ./Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/vmmeter.h - ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/ - *** OR: - $ cd - $ sudo cp - ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/vmmeter.h - ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/ - ***/ -#endif /* iOS */ +#ifndef __MACH__ #include +#endif #else #include #if !(defined(__sun) || defined(__SVR4) || defined(__svr4__) || \