8000 fixes for compilation under os x · devstator82/sqlcipher@786292f · GitHub
[go: up one dir, main page]

Skip to content

Commit 786292f

Browse files
committed
fixes for compilation under os x
1 parent 5d4ded1 commit 786292f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/crypto_impl.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#include "btreeInt.h"
66
#include "crypto.h"
77
#ifndef OMIT_MEMLOCK
8-
#if defined __unix__ || defined MAC_OS_X
8+
#if defined(__unix__) || defined(__APPLE__)
99
#include <sys/mman.h>
10-
#elif defined _WIN32
10+
#elif defined(_WIN32)
1111
# include <windows.h>
1212
#endif
1313
#endif
@@ -89,9 +89,9 @@ void sqlcipher_free(void *ptr, int sz) {
8989
if(sz > 0) {
9090
memset(ptr, 0, sz);
9191
#ifndef OMIT_MEMLOCK
92-
#if defined __unix__ || defined MAC_OS_X
92+
#if defined(__unix__) || defined(__APPLE__)
9393
munlock(ptr, sz);
94-
#elif defined _WIN32
94+
#elif defined(_WIN32)
9595
VirtualUnlock(ptr, sz);
9696
#endif
9797
#endif
@@ -109,9 +109,9 @@ void* sqlcipher_malloc(size_t sz) {
109109
void *ptr = sqlite3Malloc(sz);
110110
#ifndef OMIT_MEMLOCK
111111
if(ptr) {
112-
#ifdef __unix__
112+
#if defined(__unix__) || defined(__APPLE__)
113113
mlock(ptr, sz);
114-
#elif defined _WIN32
114+
#elif defined(_WIN32)
115115
VirtualLock(ptr, sz);
116116
#endif
117117
}

0 commit comments

Comments
 (0)
0