Skip to content

Commit b4a34db

Browse files
committed
fix: android build
1 parent fcda529 commit b4a34db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp/react-native-xlog-jsi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ReactNativeXLog {
44
int interceptAllReactNativeLog(jsi::Runtime& jsiRuntime) {
5-
#ifdef ANDROID
5+
#ifdef __ANDROID__
66
setLogHandler([](int priority, const char *tag, const char *message) {
77
__ComLog(priority - 2, tag, message, "", 0, "");
88
});
@@ -20,7 +20,7 @@ namespace ReactNativeXLog {
2020
// jsi::Object config = arguments[0].asObject(runtime);
2121
// jsi::Value value = config.getProperty(runtime, "isSync");
2222
bool isSync = arguments[0].getBool();
23-
#ifdef ANDROID
23+
#ifdef __ANDROID__
2424
Java_com_tencent_mars_xlog_Xlog_appenderFlush(
2525
nullptr, nullptr, 0, isSync);
2626
// std::string className = "com/tencent/mars/xlog/Log";

cpp/react-native-xlog-jsi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <jsi/jsi.h>
55

6-
#ifdef ANDROID
6+
#ifdef __ANDROID__
77
#include <jni.h>
88
#include <fb/log.h>
99
#include "xlog/android_xlog.h"

0 commit comments

Comments
 (0)