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

兼容Alpine镜像打包 #223

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ixingqiao
Copy link

出现这个错误是因为 pthread_getname_np 函数在 glibc 2.12 版本之后才被添加进来,而 Alpine Linux 发行版使用的是 musl libc,它没有实现该函数的兼容接口

FROM frolvlad/alpine-glibc:alpine-3.14

@CLAassistant
Copy link

CLAassistant commented Mar 28, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ixingqiao
❌ xingqiao


xingqiao seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -505,7 +505,9 @@ string getThreadName() {
string ret;
ret.resize(32);
auto tid = pthread_self();
pthread_getname_np(tid, (char *) ret.data(), ret.size());
#if defined(__GLIBC__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个代码如果被屏蔽了 那用什么替代这个功能呢?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

若是不支持的话,就是走后面的默认逻辑了,以tid替代相应的name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants