summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/internal/time64_helpers.h7
-rw-r--r--libc/sysdeps/linux/arm/bits/kernel_stat.h21
-rw-r--r--libc/sysdeps/linux/powerpc/bits/kernel_stat.h20
-rw-r--r--libc/sysdeps/linux/xtensa/bits/kernel_stat.h20
4 files changed, 27 insertions, 41 deletions
diff --git a/include/internal/time64_helpers.h b/include/internal/time64_helpers.h
index 7a78e8388..0f912f4bf 100644
--- a/include/internal/time64_helpers.h
+++ b/include/internal/time64_helpers.h
@@ -5,6 +5,11 @@
#include <time.h>
#include <stddef.h>
+struct __ts32_struct {
+ __S32_TYPE tv_sec;
+ __S32_TYPE tv_nsec;
+};
+
struct __ts64_struct {
__S64_TYPE tv_sec;
__S64_TYPE tv_nsec;
@@ -21,7 +26,7 @@ struct __its64_struct {
__S64_TYPE value_tv_nsec;
};
-#define TO_ITS64_P(__its) (((struct itimerspec *)(__its)) ? \
+#define TO_ITS64_P(__its) (((struct itimerspec *)(__its)) ? \
(&(struct __its64_struct) {.interval_tv_sec = ((struct itimerspec *)(__its))->it_interval.tv_sec, \
.interval_tv_nsec = ((struct itimerspec *)(__its))->it_interval.tv_nsec, \
.value_tv_sec = ((struct itimerspec *)(__its))->it_value.tv_sec, \
diff --git a/libc/sysdeps/linux/arm/bits/kernel_stat.h b/libc/sysdeps/linux/arm/bits/kernel_stat.h
index 8bddb4085..45c8e9681 100644
--- a/libc/sysdeps/linux/arm/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/arm/bits/kernel_stat.h
@@ -6,14 +6,7 @@
* different opinion on the subject... */
#if defined(__UCLIBC_USE_TIME64__)
-
-#include <bits/types.h>
-
-struct ts32_struct {
- __S32_TYPE tv_sec;
- __S32_TYPE tv_nsec;
-};
-
+#include "internal/time64_helpers.h"
#endif
struct kernel_stat {
@@ -38,9 +31,9 @@ struct kernel_stat {
unsigned long st_blksize;
unsigned long st_blocks;
#if defined(__UCLIBC_USE_TIME64__)
- struct ts32_struct __st_atim32;
- struct ts32_struct __st_mtim32;
- struct ts32_struct __st_ctim32;
+ struct __ts32_struct __st_atim32;
+ struct __ts32_struct __st_mtim32;
+ struct __ts32_struct __st_ctim32;
#else
struct timespec st_atim;
struct timespec st_mtim;
@@ -68,9 +61,9 @@ struct kernel_stat64 {
unsigned long st_blksize;
unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
#if defined(__UCLIBC_USE_TIME64__)
- struct ts32_struct __st_atim32;
- struct ts32_struct __st_mtim32;
- struct ts32_struct __st_ctim32;
+ struct __ts32_struct __st_atim32;
+ struct __ts32_struct __st_mtim32;
+ struct __ts32_struct __st_ctim32;
#else
struct timespec st_atim;
struct timespec st_mtim;
diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_stat.h b/libc/sysdeps/linux/powerpc/bits/kernel_stat.h
index 0e76120ab..c28ef2a9a 100644
--- a/libc/sysdeps/linux/powerpc/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/powerpc/bits/kernel_stat.h
@@ -6,13 +6,7 @@
* different opinion on the subject... */
#if defined(__UCLIBC_USE_TIME64__)
-#include <bits/types.h>
-
-struct ts32_struct {
- __S32_TYPE tv_sec;
- __S32_TYPE tv_nsec;
-};
-
+#include "internal/time64_helpers.h"
#endif
#if __WORDSIZE == 64
@@ -30,9 +24,9 @@ struct kernel_stat {
unsigned long st_blksize;
unsigned long st_blocks;
#if defined(__UCLIBC_USE_TIME64__)
- struct ts32_struct __st_atim32;
- struct ts32_struct __st_mtim32;
- struct ts32_struct __st_ctim32;
+ struct __ts32_struct __st_atim32;
+ struct __ts32_struct __st_mtim32;
+ struct __ts32_struct __st_ctim32;
#else
struct timespec st_atim;
struct timespec st_mtim;
@@ -56,9 +50,9 @@ struct kernel_stat64 {
long st_blksize; /* Optimal block size for I/O. */
long long st_blocks; /* Number 512-byte blocks allocated. */
#if defined(__UCLIBC_USE_TIME64__)
- struct ts32_struct __st_atim32;
- struct ts32_struct __st_mtim32;
- struct ts32_struct __st_ctim32;
+ struct __ts32_struct __st_atim32;
+ struct __ts32_struct __st_mtim32;
+ struct __ts32_struct __st_ctim32;
#else
struct timespec st_atim;
struct timespec st_mtim;
diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_stat.h b/libc/sysdeps/linux/xtensa/bits/kernel_stat.h
index 80ccdb76a..07ff39540 100644
--- a/libc/sysdeps/linux/xtensa/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/xtensa/bits/kernel_stat.h
@@ -6,13 +6,7 @@
* different opinion on the subject... */
#if defined(__UCLIBC_USE_TIME64__)
-#include <bits/types.h>
-
-struct ts32_struct {
- __S32_TYPE tv_sec;
- __S32_TYPE tv_nsec;
-};
-
+#include "internal/time64_helpers.h"
#endif
struct kernel_stat {
@@ -27,9 +21,9 @@ struct kernel_stat {
unsigned long st_blksize;
unsigned long st_blocks;
#if defined(__UCLIBC_USE_TIME64__)
- struct ts32_struct __st_atim32;
- struct ts32_struct __st_mtim32;
- struct ts32_struct __st_ctim32;
+ struct __ts32_struct __st_atim32;
+ struct __ts32_struct __st_mtim32;
+ struct __ts32_struct __st_ctim32;
#else
struct timespec st_atim;
struct timespec st_mtim;
@@ -52,9 +46,9 @@ struct kernel_stat64 {
unsigned long __uclibc_unused2;
unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
#if defined(__UCLIBC_USE_TIME64__)
- struct ts32_struct __st_atim32;
- struct ts32_struct __st_mtim32;
- struct ts32_struct __st_ctim32;
+ struct __ts32_struct __st_atim32;
+ struct __ts32_struct __st_mtim32;
+ struct __ts32_struct __st_ctim32;
#else
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */