diff --git a/base/liblog_symbols.cpp b/base/liblog_symbols.cpp index d5dfcd28b..8d5917907 100644 --- a/base/liblog_symbols.cpp +++ b/base/liblog_symbols.cpp @@ -16,14 +16,20 @@ #include "liblog_symbols.h" -#if defined(__ANDROID__) && !defined(NO_LIBLOG_DLSYM) +#if defined(__ANDROID__) +#if !defined(NO_LIBLOG_DLSYM) || defined(__ANDROID_APEX__) +#define USE_DLSYM +#endif +#endif + +#ifdef USE_DLSYM #include #endif namespace android { namespace base { -#if defined(__ANDROID__) && !defined(NO_LIBLOG_DLSYM) +#ifdef USE_DLSYM const std::optional& GetLibLogFunctions() { static std::optional liblog_functions = []() -> std::optional {