Skip to content

Commit 553c5dc

Browse files
author
Andrew Salmon
committed
sys/io.h only in linux x86_64
Make changes to reflect this
1 parent c98b9f7 commit 553c5dc

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

libc-test/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ fn main() {
180180
cfg.header("sys/fsuid.h");
181181
cfg.header("pty.h");
182182
cfg.header("shadow.h");
183+
if x86_64 {
184+
cfg.header("sys/io.h");
185+
}
183186
}
184187

185188
if linux || android {
@@ -195,7 +198,6 @@ fn main() {
195198
cfg.header("sys/syscall.h");
196199
cfg.header("sys/personality.h");
197200
cfg.header("sys/swap.h");
198-
cfg.header("sys/io.h");
199201
if !uclibc {
200202
cfg.header("sys/sysinfo.h");
201203
}

src/unix/notbsd/linux/other/b64/x86_64.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,4 +512,7 @@ extern {
512512
argc: ::c_int, ...);
513513
pub fn swapcontext(uocp: *mut ucontext_t,
514514
ucp: *const ucontext_t) -> ::c_int;
515+
pub fn iopl(level: ::c_int) -> ::c_int;
516+
pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
517+
turn_on: ::c_int) -> ::c_int;
515518
}

src/unix/notbsd/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,9 +999,6 @@ extern {
999999
pub fn swapoff(puath: *const ::c_char) -> ::c_int;
10001000
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
10011001
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
1002-
pub fn iopl(level: ::c_int) -> ::c_int;
1003-
pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
1004-
turn_on: ::c_int) -> ::c_int;
10051002
pub fn acct(filename: *const ::c_char) -> ::c_int;
10061003
pub fn brk(addr: *mut ::c_void) -> ::c_int;
10071004
pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;

0 commit comments

Comments
 (0)