[1/1] newlib: libc: add several missing headers

Message ID 20260128113642.10593-2-vladislav.v.belov@yandex.ru
State New
Headers
Series missing headers |

Commit Message

vbe-sc Jan. 28, 2026, 11:36 a.m. UTC
  This patch is including some several headers to regex.h, stdatomic.h and sys/utime.h to make them self-descriptive for compilers

Signed-off-by: vbe-sc <vladislav.v.belov@yandex.ru>
---
 newlib/libc/include/regex.h     | 1 +
 newlib/libc/include/stdatomic.h | 2 ++
 newlib/libc/include/sys/utime.h | 2 ++
 3 files changed, 5 insertions(+)
  

Comments

Corinna Vinschen Feb. 2, 2026, 12:40 p.m. UTC | #1
Hi Vladislav,

On Jan 28 14:36, vbe-sc wrote:
> This patch is including some several headers to regex.h, stdatomic.h and sys/utime.h to make them self-descriptive for compilers
> 
> Signed-off-by: vbe-sc <vladislav.v.belov@yandex.ru>
> ---
>  newlib/libc/include/regex.h     | 1 +
>  newlib/libc/include/stdatomic.h | 2 ++
>  newlib/libc/include/sys/utime.h | 2 ++
>  3 files changed, 5 insertions(+)
> 
> diff --git a/newlib/libc/include/regex.h b/newlib/libc/include/regex.h
> index 4da1a374e..2cb2e6c8a 100644
> --- a/newlib/libc/include/regex.h
> +++ b/newlib/libc/include/regex.h
> @@ -38,6 +38,7 @@
>  #define	_REGEX_H_
>  
>  #include <sys/cdefs.h>
> +#include <sys/types.h>
>  
>  /* types */
>  typedef off_t regoff_t;
> diff --git a/newlib/libc/include/stdatomic.h b/newlib/libc/include/stdatomic.h
> index 13d1e1762..0ccc8af09 100644
> --- a/newlib/libc/include/stdatomic.h
> +++ b/newlib/libc/include/stdatomic.h
> @@ -30,6 +30,8 @@
>  #ifndef _STDATOMIC_H_
>  #define	_STDATOMIC_H_
>  
> +#include "stdint.h"
> +
>  #include <sys/cdefs.h>
>  #include <sys/_types.h>

Why not

  #include <stdint.h>

here? Why placing stdint.h first and apart from to the other includes
and why using quotes?


Thanks,
Corinna
  

Patch

diff --git a/newlib/libc/include/regex.h b/newlib/libc/include/regex.h
index 4da1a374e..2cb2e6c8a 100644
--- a/newlib/libc/include/regex.h
+++ b/newlib/libc/include/regex.h
@@ -38,6 +38,7 @@ 
 #define	_REGEX_H_
 
 #include <sys/cdefs.h>
+#include <sys/types.h>
 
 /* types */
 typedef off_t regoff_t;
diff --git a/newlib/libc/include/stdatomic.h b/newlib/libc/include/stdatomic.h
index 13d1e1762..0ccc8af09 100644
--- a/newlib/libc/include/stdatomic.h
+++ b/newlib/libc/include/stdatomic.h
@@ -30,6 +30,8 @@ 
 #ifndef _STDATOMIC_H_
 #define	_STDATOMIC_H_
 
+#include "stdint.h"
+
 #include <sys/cdefs.h>
 #include <sys/_types.h>
 
diff --git a/newlib/libc/include/sys/utime.h b/newlib/libc/include/sys/utime.h
index 5e937f103..de86af58f 100644
--- a/newlib/libc/include/sys/utime.h
+++ b/newlib/libc/include/sys/utime.h
@@ -9,6 +9,8 @@ 
 extern "C" {
 #endif
 
+#include <sys/_timeval.h>
+
 struct utimbuf 
 {
   time_t actime;