rtems/../sys/dirent.h: Enable DT_ symbols for POSIX >= 202405L

Message ID 20250716185521.1849896-1-joel@rtems.org
State New
Headers
Series rtems/../sys/dirent.h: Enable DT_ symbols for POSIX >= 202405L |

Commit Message

Joel Sherrill July 16, 2025, 6:55 p.m. UTC
  Issue 8 added the DT_* device type symbols which were previously
BSD extensions.
---
 newlib/libc/sys/rtems/include/sys/dirent.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Corinna Vinschen July 17, 2025, 9:20 a.m. UTC | #1
On Jul 16 13:55, Joel Sherrill wrote:
> Issue 8 added the DT_* device type symbols which were previously
> BSD extensions.
> ---
>  newlib/libc/sys/rtems/include/sys/dirent.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/sys/rtems/include/sys/dirent.h b/newlib/libc/sys/rtems/include/sys/dirent.h
> index 6f8ff4278..3e41635b7 100644
> --- a/newlib/libc/sys/rtems/include/sys/dirent.h
> +++ b/newlib/libc/sys/rtems/include/sys/dirent.h
> @@ -99,7 +99,7 @@ struct dirent {
>  
>  #define	__dirfd(dp)	((dp)->dd_fd)
>  
> -#if __BSD_VISIBLE
> +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 202405
>  
>  /*
>   * File types
> -- 
> 2.47.1

GTG.


Thanks,
Corinna
  
Joel Sherrill July 17, 2025, 7:05 p.m. UTC | #2
Thanks.

On Thu, Jul 17, 2025 at 4:20 AM Corinna Vinschen <vinschen@redhat.com>
wrote:

> On Jul 16 13:55, Joel Sherrill wrote:
> > Issue 8 added the DT_* device type symbols which were previously
> > BSD extensions.
> > ---
> >  newlib/libc/sys/rtems/include/sys/dirent.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/newlib/libc/sys/rtems/include/sys/dirent.h
> b/newlib/libc/sys/rtems/include/sys/dirent.h
> > index 6f8ff4278..3e41635b7 100644
> > --- a/newlib/libc/sys/rtems/include/sys/dirent.h
> > +++ b/newlib/libc/sys/rtems/include/sys/dirent.h
> > @@ -99,7 +99,7 @@ struct dirent {
> >
> >  #define      __dirfd(dp)     ((dp)->dd_fd)
> >
> > -#if __BSD_VISIBLE
> > +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 202405
> >
> >  /*
> >   * File types
> > --
> > 2.47.1
>
> GTG.
>
>
> Thanks,
> Corinna
>
>
  

Patch

diff --git a/newlib/libc/sys/rtems/include/sys/dirent.h b/newlib/libc/sys/rtems/include/sys/dirent.h
index 6f8ff4278..3e41635b7 100644
--- a/newlib/libc/sys/rtems/include/sys/dirent.h
+++ b/newlib/libc/sys/rtems/include/sys/dirent.h
@@ -99,7 +99,7 @@  struct dirent {
 
 #define	__dirfd(dp)	((dp)->dd_fd)
 
-#if __BSD_VISIBLE
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 202405
 
 /*
  * File types