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

Added conditional compilation for musl targets #273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mjquinlan
Copy link

Allows building statically linked applications. This is useful for organizations needing to extend backwards compatibility to older OS releases.

@mssun
Copy link
Member

mssun commented Oct 16, 2020

Looks good to me. I think this can be documented somewhere so that other people may also interested.

@dingelish, what do you think.

@dingelish
Copy link
Contributor

sgtm :-) better if comes along with some description by either code comments or readme.

@mjquinlan
Copy link
Author

Thanks! Let me add some documentation in a second commit.

fd: c_int,
request: c_int) -> c_int {
let mut errno = 0;
let ret = unsafe { libc::ioctl(fd, request) };
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest adding conditional compilation option in this line (let ret = unsafe { libc::ioctl(fd, request) }). Because the function prototype has not changed, I think there is no need to define a function for the musl target separately.

@mssun
Copy link
Member

mssun commented Sep 13, 2021

@mjquinlan Thank you so much! I'm wondering if there's any update on this PR.

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.

4 participants