From 26dbed0f285cb6d18d55f4721966a2f8bfc7d3ec Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Wed, 4 Jan 2017 18:57:13 +0100 Subject: [PATCH] AIX-7 uses an extended O_ACCMODE --- CHANGES | 3 +++ xio.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index f594c49..e01dd9c 100644 --- a/CHANGES +++ b/CHANGES @@ -61,6 +61,9 @@ porting: OpenSSL: Use RAND_status to determine PRNG state Thanks to Adam Langley for providing a patch + AIX-7 uses an extended O_ACCMODE that does not fit socat's internal + requirements. Thanks to Garrick Trowsdale for providing a patch + testing: socks4echo.sh and socks4a-echo.sh hung with new bash with read -n diff --git a/xio.h b/xio.h index 13f7d5c..84e3641 100644 --- a/xio.h +++ b/xio.h @@ -26,7 +26,7 @@ struct opt; #define XIO_RDONLY O_RDONLY /* asserted to be 0 */ #define XIO_WRONLY O_WRONLY /* asserted to be 1 */ #define XIO_RDWR O_RDWR /* asserted to be 2 */ -#define XIO_ACCMODE O_ACCMODE /* must be 3 */ +#define XIO_ACCMODE (XIO_RDONLY|XIO_WRONLY|XIO_RDWR) /* must be 3 */ #define XIO_MAYFORK 4 /* address is allowed to fork the program (fork) */ #define XIO_MAYCHILD 8 /* address is allowed to fork off a child (exec)*/ #define XIO_MAYEXEC 16 /* address is allowed to exec a prog (exec+nofork) */