jean-airoldie / zeromq-src-rs

Source code and logic to build ZeroMQ from source
MIT License
11 stars 15 forks source link

Add ZMQ_HAVE_STRLCPY for musl #22

Closed skeet70 closed 1 year ago

skeet70 commented 1 year ago

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.

jean-airoldie commented 1 year ago

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

jean-airoldie commented 1 year ago

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

MarijnS95 commented 1 year ago

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.