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 Aug 15, 2024
1 parent 1ffe0bd commit 01a3617
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 @@ -1396,7 +1396,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 @@ -6125,6 +6125,8 @@ extern "C" {
) -> ::ssize_t;

pub fn klogctl(syslog_type: ::c_int, bufp: *mut ::c_char, len: ::c_int) -> ::c_int;

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 01a3617

Please sign in to comment.