mirror of
https://github.com/openharmony/ark_runtime_core.git
synced 2026-07-19 21:23:32 -04:00
!9 Fixed macos build
Merge pull request !9 from konstantinbaladurin/fix
This commit is contained in:
@@ -79,7 +79,6 @@ config("ark_config") {
|
||||
defines += [
|
||||
"PANDA_TARGET_UNIX",
|
||||
"PANDA_TARGET_MACOS",
|
||||
"PANDA_USE_FUTEX",
|
||||
]
|
||||
} else {
|
||||
defines += [
|
||||
|
||||
@@ -70,7 +70,6 @@ if (is_mingw) {
|
||||
"$ark_root/libpandabase/os/unix/error.cpp",
|
||||
"$ark_root/libpandabase/os/unix/file.cpp",
|
||||
"$ark_root/libpandabase/os/unix/filesystem.cpp",
|
||||
"$ark_root/libpandabase/os/unix/futex/mutex.cpp",
|
||||
"$ark_root/libpandabase/os/unix/library_loader.cpp",
|
||||
"$ark_root/libpandabase/os/unix/mem.cpp",
|
||||
"$ark_root/libpandabase/os/unix/native_stack.cpp",
|
||||
@@ -91,9 +90,12 @@ if (is_mingw) {
|
||||
if (!is_mac) {
|
||||
libarkbase_sources += [
|
||||
"$ark_root/libpandabase/os/unix/exec.cpp",
|
||||
"$ark_root/libpandabase/os/unix/futex/mutex.cpp",
|
||||
"$ark_root/libpandabase/os/unix/pipe.cpp",
|
||||
"$ark_root/libpandabase/os/unix/sighooklib/sighook.cpp",
|
||||
]
|
||||
} else {
|
||||
libarkbase_sources += [ "$ark_root/libpandabase/os/unix/mutex.cpp" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,18 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
// Mac Os' libc doesn't have this macro
|
||||
#ifndef TEMP_FAILURE_RETRY
|
||||
#define TEMP_FAILURE_RETRY(exp) \
|
||||
(__extension__({ \
|
||||
decltype(exp) _result; \
|
||||
do { \
|
||||
_result = (exp); \
|
||||
} while (_result == -1 && errno == EINTR); \
|
||||
_result; \
|
||||
}))
|
||||
#endif
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||
#define PANDA_FAILURE_RETRY(exp) (__extension__ TEMP_FAILURE_RETRY(exp))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user