mdbx: Don't include <sys/vmmeter.h> 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
This commit is contained in:
Jens Alfke 2020-04-10 11:40:58 -07:00 committed by GitHub
parent 19454f26e6
commit 48b6f76159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,26 +90,9 @@
#else
#define SYSCTL_LEGACY_NONCONST_MIB
#endif
#if defined(__APPLE__) && !__has_include(<sys/vmmeter.h>)
#warning "The <sys/vmmeter.h> 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 <your Xcode.app>
$ 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 <your Xcode.app>
$ 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 <sys/vmmeter.h>
#endif
#else
#include <malloc.h>
#if !(defined(__sun) || defined(__SVR4) || defined(__svr4__) || \