Skip to content

Commit

Permalink
Unify the ioctl declarations on linux
Browse files Browse the repository at this point in the history
This uses the existing Ioctl type to reduce the duplication.
  • Loading branch information
espindola committed May 25, 2024
1 parent acc7bb1 commit 9b4aea4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,6 @@ extern "C" {
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;

pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char;
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int;
pub fn glob64(
pattern: *const ::c_char,
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6087,6 +6087,8 @@ extern "C" {
len: ::size_t,
flags: ::c_uint,
) -> ::ssize_t;

pub fn ioctl(fd: ::c_int, request: ::Ioctl, ...) -> ::c_int;
}

// LFS64 extensions
Expand Down
1 change: 0 additions & 1 deletion src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,6 @@ extern "C" {
new_limit: *const ::rlimit,
old_limit: *mut ::rlimit,
) -> ::c_int;
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
pub fn ptrace(request: ::c_int, ...) -> ::c_long;
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
Expand Down
1 change: 0 additions & 1 deletion src/unix/linux_like/linux/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ pub const UDP_SEGMENT: ::c_int = 103;
pub const YESEXPR: ::c_int = ((5) << 8) | (0);

extern "C" {
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;

pub fn pthread_rwlockattr_getkind_np(
Expand Down

0 comments on commit 9b4aea4

Please sign in to comment.