diff --git a/src/process.c b/src/process.c index 9f21bbf7..2b438426 100644 --- a/src/process.c +++ b/src/process.c @@ -60,7 +60,7 @@ char * rcutils_get_executable_name(rcutils_allocator_t allocator) #if defined __APPLE__ || defined __FreeBSD__ || (defined __ANDROID__ && __ANDROID_API__ >= 21) const char * appname = getprogname(); -#elif defined __GNUC__ && !defined(__QNXNTO__) && !defined(__OHOS__) +#elif defined __GNUC__ && !defined(__QNXNTO__) const char * appname = program_invocation_name; #elif defined _WIN32 || defined __CYGWIN__ char appname[MAX_PATH]; @@ -68,7 +68,7 @@ char * rcutils_get_executable_name(rcutils_allocator_t allocator) if (size == 0) { return NULL; } -#elif defined __QNXNTO__ || defined __OHOS__ +#elif defined __QNXNTO__ extern char * __progname; const char * appname = __progname; #else diff --git a/src/shared_library.c b/src/shared_library.c index f26d6b15..0190afcc 100644 --- a/src/shared_library.c +++ b/src/shared_library.c @@ -127,7 +127,7 @@ rcutils_load_shared_library( goto fail; } lib->library_path = rcutils_strdup(image_name, lib->allocator); -#elif defined(_GNU_SOURCE) && !defined(__QNXNTO__) && !defined(__ANDROID__) && !defined(__OHOS__) +#elif defined(_GNU_SOURCE) && !defined(__QNXNTO__) && !defined(__ANDROID__) struct link_map * map = NULL; if (dlinfo(lib->lib_pointer, RTLD_DI_LINKMAP, &map) != 0) { RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING("dlinfo error: %s", dlerror());