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

Add ZMQ_HAVE_STRLCPY for musl #22

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

skeet70
Copy link
Contributor

@skeet70 skeet70 commented Dec 15, 2022

AFAIK (not a c++ programmer) musl's libc always has strlcpy defined, unlike glibc. It may be possible to have this conditional outside of the target.contains("linux") section, but I don't have a good way to test that. I'm not sure why libzmq's ZMQ_HAVE_STRLCPY configure detection code doesn't work here, but I know this change fixes the issue.

Fixes #21.

AFAIK (not a c++ programmer) musl's libc always has `strlcpy` defined,
unlike glibc. It may be possible to have this conditional outside of the
`target.contains("linux")` section, but I don't have a good way to test
that.
@jean-airoldie
Copy link
Owner

Thanks. I'll do a release with a minor bump.

@jean-airoldie jean-airoldie merged commit d6623bb into jean-airoldie:master Dec 16, 2022
@jean-airoldie
Copy link
Owner

The zmq build code is a mess so I'm suprised.

@skeet70 skeet70 deleted the fix-musl branch December 16, 2022 16:51
@MarijnS95
Copy link
Contributor

MarijnS95 commented Aug 4, 2023

I'm not sure why libzmq's ZMQ_HAVE_STRLCPY configure detection code doesn't work here, but I know this change fixes the issue.

Better late than never to explain this, but libzmq's cmake-based build system is not used at all since #17. A massively slimmed down version of it now lives in build.rs, and we're currently running into the limitations on Glibc as well which now also provides strlcpy since 2.38: #28.

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.

regression: builds broken on musl
3 participants