Skip to content

Commit 5fab2f6

Browse files
committed
Add iopl/ioperm to musl x86_64
Note that I think this is available on more than x86_64, but that is all that I have to test. This also matches what was done for glibc systems.
1 parent acc7bb1 commit 5fab2f6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

libc-test/semver/linux-x86_64.txt

+2
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ TIOCGRS485
140140
TIOCSBRK
141141
TIOCSRS485
142142
greg_t
143+
ioperm
144+
iopl
143145
max_align_t
144146
mcontext_t
145147
ucontext_t

src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,6 @@ extern "C" {
802802
pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
803803
pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...);
804804
pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int;
805-
pub fn iopl(level: ::c_int) -> ::c_int;
806-
pub fn ioperm(from: ::c_ulong, num: ::c_ulong, turn_on: ::c_int) -> ::c_int;
807805
}
808806

809807
cfg_if! {

src/unix/linux_like/linux/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,16 @@ cfg_if! {
17761776
}
17771777
}
17781778

1779+
cfg_if! {
1780+
if #[cfg(all(any(target_env = "gnu", target_env = "musl", target_env = "ohos"),
1781+
target_arch = "x86_64"))] {
1782+
extern "C" {
1783+
pub fn iopl(level: ::c_int) -> ::c_int;
1784+
pub fn ioperm(from: ::c_ulong, num: ::c_ulong, turn_on: ::c_int) -> ::c_int;
1785+
}
1786+
}
1787+
}
1788+
17791789
cfg_if! {
17801790
if #[cfg(any(target_env = "gnu", target_env = "musl", target_env = "ohos"))] {
17811791
pub const ABDAY_1: ::nl_item = 0x20000;

0 commit comments

Comments
 (0)