We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7d713d commit 1c4bfb0Copy full SHA for 1c4bfb0
src/unix/linux_like/mod.rs
@@ -574,10 +574,13 @@ pub const SIGALRM: ::c_int = 14;
574
pub const SIGTERM: ::c_int = 15;
575
576
const SIGEV_MAX_SIZE: usize = 64;
577
-#[cfg(target_pointer_width = "64")]
578
-const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 8;
579
-#[cfg(target_pointer_width = "32")]
580
-const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 4;
+cfg_if! {
+ if #[cfg(target_pointer_width = "64")] {
+ const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 8;
+ } else {
581
+ const __ARCH_SIGEV_PREAMBLE_SIZE: usize = 4 * 2 + 4;
582
+ }
583
+}
584
const SIGEV_PAD_SIZE: usize = (SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / 4;
585
586
pub const PROT_NONE: ::c_int = 0;
0 commit comments