Fix struct __kernel_old_timeval redefinition on 64bit sparc
PATCH 1/1 Fix struct __kernel_old_timeval redefinition on 64bit sparc
64bit sparc is the only arch which defines struct __kernel_old_timeval in it's asm/posix_types.h header, thus guard it.
NOTE: previously it was guarded with __kernel_timex, which worked as well.
Fixes a6607b81b ("syscalls: Don't pass struct timeval to tst_syscall()")
Signed-off-by Petr Vorel <[email protected]>
--- include/tst_timer.h | 2 ++ 1 file changed, 2 insertions(+)
include/tst_timer.h +2 -0
@@ -99,10 +99,12 @@ static inline long long tst_timeval_diff_ms(struct timeval t1,typedef __kernel_long_t __kernel_old_time_t ; +#ifndef __kernel_old_timevalstruct __kernel_old_timeval {__kernel_old_time_t tv_sec;/* seconds */ __kernel_suseconds_t tv_usec;/* microseconds */ }; +#endif struct __kernel_old_timespec {__kernel_old_time_t tv_sec;/* seconds */
Signature · 1 line
2.29.2
PATCH 1/1 Fix struct __kernel_old_timeval redefinition on 64bit sparc
HI Petr
This patch is obviously ok, merged.
Best Regards
Yang Xu
Quoted 29 lines
64bit sparc is the only arch which defines struct
__kernel_old_timevalin it'sasm/posix_types.hheader, thus guard it.NOTE: previously it was guarded with
__kernel_timex, which worked as well.Fixes a6607b81b ("syscalls: Don't pass struct timeval to tst_syscall()")Signed-off-by Petr Vorel<[email protected]>--- include/tst_timer.h | 2 ++ 1 file changed, 2 insertions(+)include/tst_timer.h +2
-0@@ -99,10 +99,12 @@ static inline long long tst_timeval_diff_ms(struct timeval t1,typedef __kernel_long_t __kernel_old_time_t ; +#ifndef __kernel_old_timevalstruct __kernel_old_timeval {__kernel_old_time_t tv_sec;/* seconds */ __kernel_suseconds_t tv_usec;/* microseconds */ }; +#endif struct __kernel_old_timespec {__kernel_old_time_t tv_sec;/* seconds */