[v2] libc/include/regex.h: Add include of <sys/_types.h> for off_t

Message ID 20260205211540.3724506-1-joel@rtems.org
State New
Headers
Series [v2] libc/include/regex.h: Add include of <sys/_types.h> for off_t |

Commit Message

Joel Sherrill Feb. 5, 2026, 9:15 p.m. UTC
  The winsup/ version of regex.h already had this include. Without
it, including <regex.h> by itself would not compile.
---
 newlib/libc/include/regex.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Corinna Vinschen Feb. 7, 2026, 9:46 a.m. UTC | #1
On Feb  5 15:15, Joel Sherrill wrote:
> The winsup/ version of regex.h already had this include. Without
> it, including <regex.h> by itself would not compile.
> ---
>  newlib/libc/include/regex.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/include/regex.h b/newlib/libc/include/regex.h
> index 4da1a374e..0b1c633d0 100644
> --- a/newlib/libc/include/regex.h
> +++ b/newlib/libc/include/regex.h
> @@ -38,9 +38,10 @@
>  #define	_REGEX_H_
>  
>  #include <sys/cdefs.h>
> +#include <sys/_types.h>
>  
>  /* types */
> -typedef off_t regoff_t;
> +typedef _off_t regoff_t;
>  
>  typedef struct {
>  	int re_magic;
> -- 
> 2.47.3

LGTM, please push.


Thanks,
Corinna
  
Joel Sherrill Feb. 9, 2026, 3:16 p.m. UTC | #2
Done. Thanks.

On Sat, Feb 7, 2026 at 3:47 AM Corinna Vinschen <vinschen@redhat.com> wrote:

> On Feb  5 15:15, Joel Sherrill wrote:
> > The winsup/ version of regex.h already had this include. Without
> > it, including <regex.h> by itself would not compile.
> > ---
> >  newlib/libc/include/regex.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/newlib/libc/include/regex.h b/newlib/libc/include/regex.h
> > index 4da1a374e..0b1c633d0 100644
> > --- a/newlib/libc/include/regex.h
> > +++ b/newlib/libc/include/regex.h
> > @@ -38,9 +38,10 @@
> >  #define      _REGEX_H_
> >
> >  #include <sys/cdefs.h>
> > +#include <sys/_types.h>
> >
> >  /* types */
> > -typedef off_t regoff_t;
> > +typedef _off_t regoff_t;
> >
> >  typedef struct {
> >       int re_magic;
> > --
> > 2.47.3
>
> LGTM, please push.
>
>
> Thanks,
> Corinna
>
>
  

Patch

diff --git a/newlib/libc/include/regex.h b/newlib/libc/include/regex.h
index 4da1a374e..0b1c633d0 100644
--- a/newlib/libc/include/regex.h
+++ b/newlib/libc/include/regex.h
@@ -38,9 +38,10 @@ 
 #define	_REGEX_H_
 
 #include <sys/cdefs.h>
+#include <sys/_types.h>
 
 /* types */
-typedef off_t regoff_t;
+typedef _off_t regoff_t;
 
 typedef struct {
 	int re_magic;