Skip to content

Commit b2b253f

Browse files
committed
Add cfgs to fix compilation in more situations.
1 parent 33acaa9 commit b2b253f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/backend/linux_raw/conv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
use super::c;
1717
use super::fd::{AsRawFd, BorrowedFd, FromRawFd, RawFd};
18-
#[cfg(feature = "runtime")]
18+
#[cfg(any(feature = "event", feature = "runtime"))]
1919
use super::io::errno::try_decode_error;
2020
#[cfg(target_pointer_width = "64")]
2121
use super::io::errno::try_decode_u64;
@@ -874,7 +874,7 @@ pub(super) unsafe fn ret(raw: RetReg<R0>) -> io::Result<()> {
874874
///
875875
/// The caller must ensure that this is the return value of a syscall which
876876
/// doesn't return on success.
877-
#[cfg(feature = "runtime")]
877+
#[cfg(any(feature = "event", feature = "runtime"))]
878878
#[inline]
879879
pub(super) unsafe fn ret_error(raw: RetReg<R0>) -> io::Errno {
880880
try_decode_error(raw)

src/backend/linux_raw/io/errno.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pub(in crate::backend) unsafe fn try_decode_void<Num: RetNumber>(
236236
/// # Safety
237237
///
238238
/// This must only be used with syscalls which do not return on success.
239-
#[cfg(feature = "runtime")]
239+
#[cfg(any(feature = "event", feature = "runtime"))]
240240
#[inline]
241241
pub(in crate::backend) unsafe fn try_decode_error<Num: RetNumber>(raw: RetReg<Num>) -> io::Errno {
242242
debug_assert!(raw.is_in_range(-4095..0));

tests/net/cmsg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[cfg(feature = "pipe")]
12
#[test]
23
fn test_empty_buffers() {
34
use rustix::fd::AsFd;

0 commit comments

Comments
 (0)