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

Fix build on musl #5

Merged
merged 1 commit into from
Jun 11, 2019
Merged

Fix build on musl #5

merged 1 commit into from
Jun 11, 2019

Conversation

FauxFaux
Copy link
Contributor

@FauxFaux FauxFaux commented Jun 4, 2019

Use a macro to avoid specifying a type for our integer constant, allowing the compiler to pick the right option for musl and non-musl.

The tests pass, but I haven't convinced myself it is actually doing the right thing.

strace seems happy:

[pid 26431] ioctl(9, BTRFS_IOC_CLONE or FICLONE, 5) = 0

Fixes #4.

This is relevant on musl, where ioctl() accepts an i32, not a u64,
apparently.

Fixes nicokoch#4.
@FauxFaux
Copy link
Contributor Author

FauxFaux commented Jun 4, 2019

Simply adding - cargo test --target=x86_64-unknown-linux-musl --verbose --all --no-fail-fast -- --nocapture to the script: has comically broken travis, because of Windows in the matrix. I have removed it. I think it should be tested, but I'm not in the mood for rewriting the whole travis matrix right now.

The target isn't even installed, so that needs handling too.

@nicokoch nicokoch merged commit e8d93b4 into nicokoch:master Jun 11, 2019
@nicokoch
Copy link
Owner

Thanks!

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.

Builds fails against musl: libc::ioctl has different argument types
2 participants