summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2024-02-06 13:10:52 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2024-02-07 12:17:48 +0100
commit8f602010268851212eb89e8b2fa737e37559db5f (patch)
tree4c21114ad72f685ccfb0841a81789faec530c5b6 /include
parentb9b9935783f636fbce31ace25dc31fb957840489 (diff)
sys/stat.h: Make S_ISSOCK() available if __USE_XOPEN2K
The S_ISSOCK() macro is present in POSIX 2001.12. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Diffstat (limited to 'include')
-rw-r--r--include/sys/stat.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sys/stat.h b/include/sys/stat.h
index b6480bf97..6b6ff0047 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -117,7 +117,8 @@ __BEGIN_DECLS
# ifdef __S_IFLNK
# define S_IFLNK __S_IFLNK
# endif
-# if (defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98) \
+# if (defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98 \
+ || defined __USE_XOPEN2K) \
&& defined __S_IFSOCK
# define S_IFSOCK __S_IFSOCK
# endif
@@ -142,7 +143,7 @@ __BEGIN_DECLS
# define S_ISLNK(mode) 0
#endif
-#if (defined __USE_BSD || defined __USE_UNIX98) \
+#if (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K) \
&& defined __S_IFSOCK
# define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
#endif