Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix build on OpenHarmony (ros2#395)" #402

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from
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 src/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ 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];
int32_t size = GetModuleFileNameA(NULL, appname, MAX_PATH);
if (size == 0) {
return NULL;
}
#elif defined __QNXNTO__ || defined __OHOS__
#elif defined __QNXNTO__
extern char * __progname;
const char * appname = __progname;
#else
Expand Down
2 changes: 1 addition & 1 deletion src/shared_library.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down