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

sys_util: enable build for non-musl libraries #639

Merged
merged 4 commits into from
Nov 26, 2018
Merged

sys_util: enable build for non-musl libraries #639

merged 4 commits into from
Nov 26, 2018

Conversation

dianpopa
Copy link
Contributor

@dianpopa dianpopa commented Nov 23, 2018

The ioctl function signature in the musl library (i.e musl ioctl.c) differs from that of
glibc (i.e. glibc's ioctl) by having a different type for the request parameter. Thus,
this fix enables successful build on other non-musl libraries using
a #cfg macro.

How to test this?

cd memory_model
cargo test --target x86_64-unknown-linux-gnu # up until now this would not compile due to sys_util. From now on, it does not compile due to memory_model...Opened issue for it #638
# Also we can now build whole project with GNU target
cargo build --target x86_64-unknown-linux-gnu --all

@dianpopa dianpopa self-assigned this Nov 23, 2018
@dianpopa dianpopa requested a review from a team November 23, 2018 14:21
@andreeaflorescu
Copy link
Member

Related to: #610

iliana
iliana previously approved these changes Nov 23, 2018
Copy link

@iliana iliana left a comment

Choose a reason for hiding this comment

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

Tested that this enables building on Amazon Linux 2's Rust toolchain (which uses glibc). 👍

alxiord
alxiord previously approved these changes Nov 23, 2018
dianpopa and others added 4 commits November 26, 2018 04:09
The `ioctl` function signature in the musl library differs from that of
glibc by having a different type for the request parameter. Thus,
this fix enables successful build on other non-musl libraries using
a `#cfg` macro.

Signed-off-by: Diana Popa <dpopa@amazon.com>
When compiling with GNU there is at least one violation of the seccomp
filter: signal: 31, SIGSYS: bad system call.

This violation is causing cargo test to exit with error.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
Signed-off-by: Diana Popa <dpopa@amazon.com>
Adds a integration tests for ensuring correctness of the doc tests. The
doc tests can only be run by using the default host target (i.e GNU).

Signed-off-by: Diana Popa <dpopa@amazon.com>
Copy link
Contributor

@raduweiss raduweiss left a comment

Choose a reason for hiding this comment

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

This PR had 3 approvals before the rebase, approving now for the merge.

@dianpopa dianpopa merged commit 18cd871 into firecracker-microvm:master Nov 26, 2018
@dianpopa dianpopa deleted the random2 branch November 26, 2018 11:16
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.

5 participants