Skip to content

兼容Alpine镜像打包#223

Open
ixingqiao wants to merge 3 commits into
ZLMediaKit:masterfrom
ixingqiao:master
Open

兼容Alpine镜像打包#223
ixingqiao wants to merge 3 commits into
ZLMediaKit:masterfrom
ixingqiao:master

Conversation

@ixingqiao

Copy link
Copy Markdown

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

FROM frolvlad/alpine-glibc:alpine-3.14

@CLAassistant

CLAassistant commented Mar 28, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread src/Util/util.cpp
ret.resize(32);
auto tid = pthread_self();
pthread_getname_np(tid, (char *) ret.data(), ret.size());
#if defined(__GLIBC__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
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.

3 participants