diff mbox series

[uclibc-ng-devel,1/2] sys/stat.h: Make S_ISSOCK() available if __USE_XOPEN2K

Message ID 20240206121053.399112-1-paul@crapouillou.net
State Accepted
Headers show
Series [uclibc-ng-devel,1/2] sys/stat.h: Make S_ISSOCK() available if __USE_XOPEN2K | expand

Commit Message

Paul Cercueil Feb. 6, 2024, 12:10 p.m. UTC
The S_ISSOCK() macro is present in POSIX 2001.12.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 include/sys/stat.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Waldemar Brodkorb Feb. 9, 2024, 6:12 p.m. UTC | #1
Hi Paul,
Paul Cercueil wrote,

> The S_ISSOCK() macro is present in POSIX 2001.12.

Thanks, both patches applied and pushed,

best regards
 Waldemar
 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  include/sys/stat.h | 5 +++--
>  1 file 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
> -- 
> 2.43.0
> 
> _______________________________________________
> devel mailing list -- devel@uclibc-ng.org
> To unsubscribe send an email to devel-leave@uclibc-ng.org
>
diff mbox series

Patch

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