mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:04:12 +08:00
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:
parent
19454f26e6
commit
48b6f76159
@ -90,26 +90,9 @@
|
|||||||
#else
|
#else
|
||||||
#define SYSCTL_LEGACY_NONCONST_MIB
|
#define SYSCTL_LEGACY_NONCONST_MIB
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) && !__has_include(<sys/vmmeter.h>)
|
#ifndef __MACH__
|
||||||
#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 */
|
|
||||||
#include <sys/vmmeter.h>
|
#include <sys/vmmeter.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#if !(defined(__sun) || defined(__SVR4) || defined(__svr4__) || \
|
#if !(defined(__sun) || defined(__SVR4) || defined(__svr4__) || \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user