Skip to content

Commit 9f7e864

Browse files
xingxue-ibmtgross35
authored andcommitted
Change errno EWOULDBLOCK to make it an alias of EAGAIN.
(backport <#4790>) (cherry picked from commit 095aae8)
1 parent 381d701 commit 9f7e864

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

libc-test/build.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5354,11 +5354,9 @@ fn test_aix(target: &str) {
53545354
// Skip 'sighandler_t' assignments.
53555355
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true,
53565356

5357-
// _ALL_SOURCE defines these errno values as aliases of other errno
5358-
// values, but POSIX requires each errno to be unique. Skip these
5359-
// values because non-unique values are being used which will
5360-
// fail the test when _ALL_SOURCE is defined.
5361-
"EWOULDBLOCK" | "ENOTEMPTY" => true,
5357+
// _ALL_SOURCE defines ENOTEMPTY as an alias of EEXIST, but POSIX
5358+
// requires its value to be unique. Skip.
5359+
"ENOTEMPTY" => true,
53625360

53635361
// FIXME(ctest): These constants are intended for use as the 'int request' argument
53645362
// to 'ioctl()'. However, the AIX headers do not explicitly define their types. If a

src/unix/aix/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,8 @@ pub const ENOLCK: c_int = 49;
12751275
pub const ENOCONNECT: c_int = 50;
12761276
pub const ESTALE: c_int = 52;
12771277
pub const EDIST: c_int = 53;
1278-
pub const EWOULDBLOCK: c_int = 54;
1278+
// POSIX allows EWOULDBLOCK to be the same value as EAGAIN.
1279+
pub const EWOULDBLOCK: c_int = EAGAIN;
12791280
pub const EINPROGRESS: c_int = 55;
12801281
pub const EALREADY: c_int = 56;
12811282
pub const ENOTSOCK: c_int = 57;

0 commit comments

Comments
 (0)