From 6a0be55dda270d5941e5aa98ff203fac121181d5 Mon Sep 17 00:00:00 2001 From: Xing Xue Date: Mon, 27 Oct 2025 13:18:51 -0400 Subject: [PATCH] Define EWOULDBLOCK as an alias of EAGAIN for AIX. --- changelog/2692.fixed.md | 1 + src/errno.rs | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelog/2692.fixed.md diff --git a/changelog/2692.fixed.md b/changelog/2692.fixed.md new file mode 100644 index 0000000000..3c44361ccf --- /dev/null +++ b/changelog/2692.fixed.md @@ -0,0 +1 @@ +Define errno EWOULDBLOCK as an alias of EAGAIN to match the AIX libc definition. diff --git a/src/errno.rs b/src/errno.rs index 497e33dbbf..e34b111c60 100644 --- a/src/errno.rs +++ b/src/errno.rs @@ -3247,6 +3247,10 @@ mod consts { EOPNOTSUPP = libc::EOPNOTSUPP, } + impl Errno { + pub const EWOULDBLOCK: Errno = Errno::EAGAIN; + } + #[deprecated( since = "0.28.0", note = "please use `Errno::from_raw()` instead"