Skip to content

Commit 57d4c86

Browse files
bors[bot]asomers
andauthored
Merge #1565 #1566
1565: Update features::socket_atomic_cloexec r=asomers a=asomers Several platforms have long supported SOCK_OCLOEXEC. Mark them as supporting this feature. 1566: Correct definition of MADV_SOFT_OFFLINE on ppc r=asomers a=asomers Rust has no "ppc" target_arch. It should be "powerpc" or "powerpc64". Co-authored-by: Alan Somers <[email protected]>
3 parents e8bee6c + 658458c + 64ecb88 commit 57d4c86

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/features.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,24 @@ mod os {
9494
}
9595
}
9696

97-
#[cfg(any(target_os = "illumos"))]
97+
#[cfg(any(
98+
target_os = "dragonfly", // Since ???
99+
target_os = "freebsd", // Since 10.0
100+
target_os = "illumos", // Since ???
101+
target_os = "netbsd", // Since 6.0
102+
target_os = "openbsd", // Since 5.7
103+
target_os = "redox", // Since 1-july-2020
104+
))]
98105
mod os {
99106
/// Check if the OS supports atomic close-on-exec for sockets
100107
pub const fn socket_atomic_cloexec() -> bool {
101108
true
102109
}
103110
}
104111

105-
#[cfg(any(target_os = "macos", target_os = "freebsd",
106-
target_os = "dragonfly", target_os = "ios",
107-
target_os = "openbsd", target_os = "netbsd",
108-
target_os = "redox", target_os = "fuchsia",
112+
#[cfg(any(target_os = "macos",
113+
target_os = "ios",
114+
target_os = "fuchsia",
109115
target_os = "solaris"))]
110116
mod os {
111117
/// Check if the OS supports atomic close-on-exec for sockets

src/sys/mman.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ libc_enum!{
210210
all(target_os = "linux", any(
211211
target_arch = "aarch64",
212212
target_arch = "arm",
213-
target_arch = "ppc",
213+
target_arch = "powerpc",
214+
target_arch = "powerpc64",
214215
target_arch = "s390x",
215216
target_arch = "x86",
216217
target_arch = "x86_64",

0 commit comments

Comments
 (0)