From c82c7b66858642d4a7a6884a490e7a31fd2b56d0 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 26 Mar 2021 21:55:01 +0800 Subject: [PATCH] sys/stat.h: Add S_IREAD, S_IWRITE and S_IEXEC macro to be more compatible with BSD libc Signed-off-by: Xiang Xiao Change-Id: I4067f8cac6c465a3f1b06906e2e274a660792d93 --- include/sys/stat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sys/stat.h b/include/sys/stat.h index 6b998184a4..847660307d 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -62,6 +62,10 @@ #define S_IRUSR (1 << 8) #define S_IRWXU (7 << 6) +#define S_IREAD S_IRUSR /* Obsolete synonym provided for BSD compatibility. */ +#define S_IWRITE S_IWUSR /* Obsolete synonym provided for BSD compatibility. */ +#define S_IEXEC S_IXUSR /* Obsolete synonym provided for BSD compatibility. */ + #define S_ISVTX (1 << 9) /* "Sticky" bit (not used) */ #define S_ISGID (1 << 10) /* Set group ID bit (not used)*/ #define S_ISUID (1 << 11) /* Set UID bit (not used) */