Skip to content

Commit

Permalink
style fixes to satisfy new rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
skrap committed Feb 13, 2021
1 parent 13090df commit 3378f0c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,7 @@ fn test_linux(target: &str) {
// support, we except them from the tests here.
// See https://github.com/rust-lang/libc/pull/2019#issuecomment-754351482
"EPOLLEXCLUSIVE" | "EPOLLWAKEUP" if uclibc => true,

// FIXME: Requires recent kernel headers (5.8):
"STATX_MNT_ID" => true,

Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux_like/linux/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ pub const LC_ALL: ::c_int = 6;
// end different section

// MS_ flags for mount(2)
pub const MS_RMT_MASK: ::c_ulong = ::MS_RDONLY|::MS_SYNCHRONOUS|
::MS_MANDLOCK|::MS_I_VERSION;
pub const MS_RMT_MASK: ::c_ulong =
::MS_RDONLY | ::MS_SYNCHRONOUS | ::MS_MANDLOCK | ::MS_I_VERSION;

pub const ENOTSUP: ::c_int = EOPNOTSUPP;

Expand Down
18 changes: 12 additions & 6 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,18 +623,24 @@ extern "C" {
...
) -> ::c_int;
pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int;
#[cfg_attr(all(target_os = "linux", not(target_env = "uclibc")),
link_name = "__isoc99_fscanf")]
#[cfg_attr(
all(target_os = "linux", not(target_env = "uclibc")),
link_name = "__isoc99_fscanf"
)]
pub fn fscanf(
stream: *mut ::FILE,
format: *const ::c_char,
...
) -> ::c_int;
#[cfg_attr(all(target_os = "linux", not(target_env = "uclibc")),
link_name = "__isoc99_scanf")]
#[cfg_attr(
all(target_os = "linux", not(target_env = "uclibc")),
link_name = "__isoc99_scanf"
)]
pub fn scanf(format: *const ::c_char, ...) -> ::c_int;
#[cfg_attr(all(target_os = "linux", not(target_env = "uclibc")),
link_name = "__isoc99_sscanf")]
#[cfg_attr(
all(target_os = "linux", not(target_env = "uclibc")),
link_name = "__isoc99_sscanf"
)]
pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...)
-> ::c_int;
pub fn getchar_unlocked() -> ::c_int;
Expand Down

0 comments on commit 3378f0c

Please sign in to comment.