Skip to content

Commit 67d83f3

Browse files
committed
Fix cfg syntax warnings in libnative
1 parent c586490 commit 67d83f3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/libnative/io/c_unix.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,9 @@ mod signal {
232232
pub static SA_SIGINFO: libc::c_int = 0x0040;
233233
pub static SIGCHLD: libc::c_int = 20;
234234

235-
#[cfg(target_os = "macos")]
236-
#[cfg(target_os = "ios")]
235+
#[cfg(any(target_os = "macos", target_os = "ios"))]
237236
pub type sigset_t = u32;
238-
#[cfg(target_os = "freebsd")]
239-
#[cfg(target_os = "dragonfly")]
237+
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
240238
#[repr(C)]
241239
pub struct sigset_t {
242240
bits: [u32, ..4],
@@ -254,8 +252,7 @@ mod signal {
254252
pub status: libc::c_int,
255253
}
256254

257-
#[cfg(target_os = "macos")]
258-
#[cfg(target_os = "ios")]
255+
#[cfg(any(target_os = "macos", target_os = "ios"))]
259256
#[repr(C)]
260257
pub struct sigaction {
261258
pub sa_handler: extern fn(libc::c_int),
@@ -264,8 +261,7 @@ mod signal {
264261
pub sa_flags: libc::c_int,
265262
}
266263

267-
#[cfg(target_os = "freebsd")]
268-
#[cfg(target_os = "dragonfly")]
264+
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
269265
#[repr(C)]
270266
pub struct sigaction {
271267
pub sa_handler: extern fn(libc::c_int),

0 commit comments

Comments
 (0)