mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx: crutch for iOS.
Workaround for https://github.com/erthink/libmdbx/issues/92 Change-Id: Id8ed900d1310212ae0edd4bf6ab11bdba9c106a1
This commit is contained in:
parent
921f43da6f
commit
ed6863851e
@ -72,6 +72,10 @@
|
|||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
/* Systems includes */
|
/* Systems includes */
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <TargetConditionals.h>
|
||||||
|
#endif /* Apple OSX & iOS */
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
|
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
|
||||||
defined(__BSD__) || defined(__bsdi__) || defined(__DragonFly__) || \
|
defined(__BSD__) || defined(__bsdi__) || defined(__DragonFly__) || \
|
||||||
defined(__APPLE__) || defined(__MACH__)
|
defined(__APPLE__) || defined(__MACH__)
|
||||||
@ -86,6 +90,25 @@
|
|||||||
#else
|
#else
|
||||||
#define SYSCTL_LEGACY_NONCONST_MIB
|
#define SYSCTL_LEGACY_NONCONST_MIB
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__APPLE__) && !__has_include(<sys/vmmeter.h>)
|
||||||
|
#warning "Header <sys/vmmeter.h> by default 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>
|
||||||
#else
|
#else
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user