summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonah Petri <jonah@petri.us>2021-02-12 22:19:29 -0500
committerJonah Petri <jonah@petri.us>2021-02-13 15:04:45 -0500
commit3378f0cebfce965a91b8f02e87b64913afa367f4 (patch)
tree4ba8272ab508045512d24f38ea198a97c8f62460
parent13090dfcc0fa8bcda0d329797dda5383093c0f3c (diff)
downloadrust-libc-3378f0cebfce965a91b8f02e87b64913afa367f4.tar.gz
style fixes to satisfy new rustfmt
-rwxr-xr-xlibc-test/build.rs2
-rw-r--r--src/unix/linux_like/linux/uclibc/mod.rs4
-rw-r--r--src/unix/mod.rs18
3 files changed, 15 insertions, 9 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index aec143fe8f..0eb23ef3d4 100755
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -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,
diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs
index a86d18ccdd..cc5d5cdce9 100644
--- a/src/unix/linux_like/linux/uclibc/mod.rs
+++ b/src/unix/linux_like/linux/uclibc/mod.rs
@@ -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;
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 6aa6c5b53e..b3c0b47141 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -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;