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.

(backport <rust-lang#3722>)
(cherry picked from commit 01a3617)
  • Loading branch information
espindola authored and tgross35 committed Aug 29, 2024
1 parent 9b88c55 commit adafc28
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 @@ -1405,7 +1405,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 @@ -5635,6 +5635,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 @@ -853,7 +853,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 adafc28

Please sign in to comment.