From 99f07f50540e757a45721f782d553ef91a0f7442 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Wed, 8 Apr 2020 02:05:18 +0300 Subject: [PATCH] mdbx: add iOS notes to README. Change-Id: Ia46a43376370a73b179dbc4ab65e43956ee8c43a --- README.md | 13 +++++++++++++ src/elements/osal.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d95838f0..edf7a200 100644 --- a/README.md +++ b/README.md @@ -416,6 +416,19 @@ will need to install the current (not outdated) version of recommend that you install [Homebrew](https://brew.sh/) and then execute `brew install bash`. +### iOS +Unfortunately, the current versions of the iPhone SDK are missing few +important system header files, and one of these files is required for +building the library. So you should manually copy at least the `sys/vmmeter.h` +from the OSX SDK or iPhoneSimulator SDK. If this header file is missing, +you will get the corresponding message from the compiler, and near in the +src/elements/osal.h` file there are [examples of how this can be done](src/elements/osal.h#L97-L109). + +To build _libmdbx_ for iOS, we recommend using CMake using the +"[toolchain file](https://cmake.org/cmake/help/latest/variable/CMAKE_TOOLCHAIN_FILE.html)" +from the [ios-cmake](https://github.com/leetal/ios-cmake) project. + + ## API description For more information and API description see the [mdbx.h](mdbx.h) header. diff --git a/src/elements/osal.h b/src/elements/osal.h index 8cc423ed..453c3ca9 100644 --- a/src/elements/osal.h +++ b/src/elements/osal.h @@ -91,7 +91,7 @@ #define SYSCTL_LEGACY_NONCONST_MIB #endif #if defined(__APPLE__) && !__has_include() -#warning "Header by default is missing in iOS SDK. " \ +#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: