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

Build: Check __GLIBC__ for OpenHarmony to fix build fail. v6.0.83 #3777

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

terrencetang2023
Copy link
Contributor

@terrencetang2023 terrencetang2023 commented Aug 21, 2023

When I compile on OpenHarmony, I encounter an error at the pthread_setname_np function:

./src/app/srs_app_threads.cpp:53:10: error: functions that differ only in their return type cannot be overloaded
void pthread_setname_np(pthread_t trd, const char* name) {
/data/local/ohos-sdk/linux/native/llvm/bin/../../sysroot/usr/include/pthread.h:379:5: note: previous declaration is here
int pthread_setname_np(pthread_t, const char *);

Our libc is using musl-libc and has no defined GLIBC, so we wanted to add a judgment that GLIBC already defined.


TRANS_BY_GPT4

@winlinvip winlinvip changed the title Compile: Add a __GLIBC__ definition for the pthread_setname_np Compile: Add a __GLIBC__ definition for the pthread_setname_np. v6.0.83 Sep 22, 2023
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Sep 22, 2023
@winlinvip winlinvip changed the title Compile: Add a __GLIBC__ definition for the pthread_setname_np. v6.0.83 Build: Check __GLIBC__ for OpenHarmony to fix build fail. v6.0.83 Sep 22, 2023
@winlinvip winlinvip merged commit 5b31225 into ossrs:develop Sep 22, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RefinedByAI Refined by AI/GPT. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants