Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,13 @@ set(REALM_HAVE_BACKTRACE ${Backtrace_FOUND})

if(REALM_ENABLE_SYNC)
option(REALM_FORCE_OPENSSL "Always use OpenSSL for SSL needs, regardless of target platform." OFF)
if(CMAKE_SYSTEM_NAME MATCHES "^Windows|Linux|Android")
if(CMAKE_SYSTEM_NAME MATCHES "^Windows|Linux|Android|OHOS")
set(REALM_NEEDS_OPENSSL TRUE)
endif()
if(REALM_NEEDS_OPENSSL OR REALM_FORCE_OPENSSL)
option(REALM_INCLUDE_CERTS "Include a list of trust certificates in the build for OpenSSL certificate verification" ON)
endif()
elseif(REALM_ENABLE_ENCRYPTION AND CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
elseif(REALM_ENABLE_ENCRYPTION AND CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OHOS")
set(REALM_NEEDS_OPENSSL TRUE)
endif()

Expand Down
6 changes: 5 additions & 1 deletion src/realm/util/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@
#if defined ANDROID || defined __ANDROID_API__
#define REALM_ANDROID 1
#define REALM_LINUX 0
#elif defined __OHOS__
#define REALM_ANDROID 0
#define REALM_LINUX 0
#define REALM_OHOS 1
#elif defined(__linux__)
#define REALM_ANDROID 0
#define REALM_LINUX 1
Expand Down Expand Up @@ -275,7 +279,7 @@
#define REALM_APPLE_DEVICE 0
#endif

#if REALM_ANDROID || REALM_IOS || REALM_WATCHOS || REALM_TVOS || REALM_UWP
#if REALM_ANDROID || REALM_IOS || REALM_WATCHOS || REALM_TVOS || REALM_UWP || REALM_OHOS
#define REALM_MOBILE 1
#else
#define REALM_MOBILE 0
Expand Down
4 changes: 4 additions & 0 deletions src/realm/util/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,18 @@
#if _POSIX_THREADS >= 200809L
#ifdef __GNU_LIBRARY__
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 12 && !REALM_ANDROID
#ifndef REALM_OHOS
#define REALM_HAVE_ROBUST_PTHREAD_MUTEX
#endif
#endif
#elif !REALM_ANDROID
#ifndef REALM_OHOS
#define REALM_HAVE_ROBUST_PTHREAD_MUTEX
#endif
#endif
#endif
#endif
#endif


using namespace realm;
Expand Down