mirror of
https://github.com/Tencent/MMKV.git
synced 2026-10-26 10:23:32 +08:00
most things for Win32 actually work
This commit is contained in:
+13
-12
@@ -18,22 +18,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "InterProcessLock.h"
|
||||
#include "MMBuffer.h"
|
||||
#include "MMKVLog.h"
|
||||
#include "MemoryFile.h"
|
||||
#include "ScopedLock.hpp"
|
||||
#include <cerrno>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef MMKV_ANDROID
|
||||
# include "InterProcessLock.h"
|
||||
# include "MMBuffer.h"
|
||||
# include "MMKVLog.h"
|
||||
# include "ScopedLock.hpp"
|
||||
# include <cerrno>
|
||||
# include <fcntl.h>
|
||||
# include <sys/mman.h>
|
||||
# include <sys/stat.h>
|
||||
# include <unistd.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace mmkv {
|
||||
|
||||
#ifdef MMKV_ANDROID
|
||||
// for Android Q limiting ashmem access
|
||||
extern int ASharedMemory_create(const char *name, size_t size);
|
||||
extern size_t ASharedMemory_getSize(int fd);
|
||||
@@ -74,10 +75,10 @@ MemoryFile::MemoryFile(int ashmemFD)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace mmkv
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MMKV_ANDROID
|
||||
# pragma mark - ashmem
|
||||
# include <dlfcn.h>
|
||||
|
||||
Reference in New Issue
Block a user