Skip to content

Commit 34a6d10

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 1ffe0bd commit 34a6d10

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

libc-test/semver/linux-i686.txt

+2
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ fsblkcnt64_t
215215
fsfilcnt64_t
216216
getcontext
217217
greg_t
218+
ioperm
219+
iopl
218220
makecontext
219221
max_align_t
220222
mcontext_t

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
@@ -1777,6 +1777,16 @@ cfg_if! {
17771777
}
17781778
}
17791779

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

0 commit comments

Comments
 (0)