[RFC,08/12] y2038: Convert __make_timespec to be Y2038 safe

Message ID 20200601140740.16371-9-lukma@denx.de
State Dropped
Delegated to: Lukasz Majewski
Headers
Series y2038: Convert timespec_{sub|add|create} in support to be Y2038 safe |

Commit Message

Lukasz Majewski June 1, 2020, 2:07 p.m. UTC
  The conversion was to use Y2038 safe struct __timespec64 and __time64_t.
---
 support/timespec.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/support/timespec.h b/support/timespec.h
index 936d0b0d84..8de40d25f4 100644
--- a/support/timespec.h
+++ b/support/timespec.h
@@ -29,10 +29,10 @@  struct timespec __timespec_add (struct timespec, struct timespec)
 struct timespec __timespec_sub (struct timespec, struct timespec)
   __attribute__((const));
 
-static inline struct timespec
-__make_timespec (time_t s, long int ns)
+static inline struct __timespec64
+__make_timespec (__time64_t s, long int ns)
 {
-  struct timespec r;
+  struct __timespec64 r;
   r.tv_sec = s;
   r.tv_nsec = ns;
   return r;