[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251029-nolibc-uapi-types-v1-9-e79de3b215d8@weissschuh.net>
Date: Wed, 29 Oct 2025 17:02:59 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Willy Tarreau <w@....eu>, Shuah Khan <shuah@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org, 
 linux-kselftest@...r.kernel.org, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 09/12] tools/nolibc: use a custom struct timespec
A custom 'struct timespec' will be necessary for 64-bit time types on
32-bit architectures. <linux/time.h> will define other time-related
types in terms of the custom definition.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
 tools/include/nolibc/arch-s390.h | 3 +++
 tools/include/nolibc/types.h     | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/include/nolibc/arch-s390.h b/tools/include/nolibc/arch-s390.h
index 6237211385c0..1e87ac42ab9c 100644
--- a/tools/include/nolibc/arch-s390.h
+++ b/tools/include/nolibc/arch-s390.h
@@ -5,6 +5,9 @@
 
 #ifndef _NOLIBC_ARCH_S390_H
 #define _NOLIBC_ARCH_S390_H
+
+#include "types.h"
+
 #include <linux/signal.h>
 #include <linux/unistd.h>
 
diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h
index 16c6e9ec9451..4f5a25567e5c 100644
--- a/tools/include/nolibc/types.h
+++ b/tools/include/nolibc/types.h
@@ -13,9 +13,16 @@
 #include "std.h"
 #include <linux/mman.h>
 #include <linux/stat.h>
-#include <linux/time.h>
 #include <linux/wait.h>
 
+struct timespec {
+	time_t	tv_sec;
+	long	tv_nsec;
+};
+#define _STRUCT_TIMESPEC
+
+#include <linux/time.h>
+
 
 /* Only the generic macros and types may be defined here. The arch-specific
  * ones such as the O_RDONLY and related macros used by fcntl() and open()
-- 
2.51.1.dirty
Powered by blists - more mailing lists
 
