Skip to content

Commit f48d010

Browse files
authored
Merge pull request #3720 from espindola/musl-iopl
Add iopl/ioperm to all linuxes
2 parents fbec928 + 083499a commit f48d010

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
@@ -216,6 +216,8 @@ fsblkcnt64_t
216216
fsfilcnt64_t
217217
getcontext
218218
greg_t
219+
ioperm
220+
iopl
219221
makecontext
220222
max_align_t
221223
mcontext_t

libc-test/semver/linux-x86_64.txt

+2
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ TIOCGRS485
141141
TIOCSBRK
142142
TIOCSRS485
143143
greg_t
144+
ioperm
145+
iopl
144146
max_align_t
145147
mcontext_t
146148
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
@@ -1771,6 +1771,16 @@ cfg_if! {
17711771
}
17721772
}
17731773

1774+
cfg_if! {
1775+
if #[cfg(all(any(target_env = "gnu", target_env = "musl", target_env = "ohos"),
1776+
any(target_arch = "x86_64", target_arch = "x86")))] {
1777+
extern "C" {
1778+
pub fn iopl(level: ::c_int) -> ::c_int;
1779+
pub fn ioperm(from: ::c_ulong, num: ::c_ulong, turn_on: ::c_int) -> ::c_int;
1780+
}
1781+
}
1782+
}
1783+
17741784
cfg_if! {
17751785
if #[cfg(any(target_env = "gnu", target_env = "musl", target_env = "ohos"))] {
17761786
pub const ABDAY_1: ::nl_item = 0x20000;

0 commit comments

Comments
 (0)