Skip to content

Commit

Permalink
group extern blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehri01 committed Dec 25, 2024
1 parent 1a328b5 commit 955af3e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2214,18 +2214,6 @@ cfg_if! {
}
}

cfg_if! {
if #[cfg(all(
any(target_env = "gnu", target_env = "musl", target_env = "ohos"),
any(target_arch = "x86_64", target_arch = "x86")
))] {
extern "C" {
pub fn iopl(level: c_int) -> c_int;
pub fn ioperm(from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int;
}
}
}

cfg_if! {
if #[cfg(any(
target_env = "gnu",
Expand Down Expand Up @@ -6087,6 +6075,18 @@ safe_f! {
}
}

cfg_if! {
if #[cfg(all(
any(target_env = "gnu", target_env = "musl", target_env = "ohos"),
any(target_arch = "x86_64", target_arch = "x86")
))] {
extern "C" {
pub fn iopl(level: c_int) -> c_int;
pub fn ioperm(from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int;
}
}
}

cfg_if! {
if #[cfg(all(not(target_env = "uclibc"), not(target_env = "ohos")))] {
extern "C" {
Expand Down

0 comments on commit 955af3e

Please sign in to comment.