Skip to content

Commit

Permalink
Compile: Add a __GLIBC__ definition for the pthread_setname_np
Browse files Browse the repository at this point in the history
  • Loading branch information
terrencetang2023 committed Aug 21, 2023
1 parent fe38804 commit 3d7bac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trunk/src/app/srs_app_threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ using namespace std;

// These functions first appeared in glibc in version 2.12.
// See https://man7.org/linux/man-pages/man3/pthread_setname_np.3.html
#if defined(SRS_CYGWIN64) || (defined(SRS_CROSSBUILD) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
#if defined(SRS_CYGWIN64) || (defined(SRS_CROSSBUILD) && defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
void pthread_setname_np(pthread_t trd, const char* name) {
}
#endif
Expand Down

0 comments on commit 3d7bac4

Please sign in to comment.