Skip to content

Commit

Permalink
arch: sparc: Override struct __kernel_old_timeval
Browse files Browse the repository at this point in the history
struct __kernel_old_timeval is supposed to have the same
layout as struct timeval. But, it was inadvarently missed
that __kernel_suseconds has a different definition for
sparc64.
Provide an asm-specific override that fixes it.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Cc: sparclinux@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Deepa Dinamani authored and David S. Miller committed Feb 3, 2019
1 parent 7f1bc6e commit bcb3fc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/sparc/include/uapi/asm/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ typedef unsigned short __kernel_old_gid_t;
typedef int __kernel_suseconds_t;
#define __kernel_suseconds_t __kernel_suseconds_t

typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;
#define __kernel_long_t __kernel_long_t

struct __kernel_old_timeval {
__kernel_long_t tv_sec;
__kernel_suseconds_t tv_usec;
};
#define __kernel_old_timeval __kernel_old_timeval

#else
/* sparc 32 bit */

Expand Down
2 changes: 2 additions & 0 deletions include/uapi/linux/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ struct __kernel_itimerspec {
* here, this is probably because it is not y2038 safe and needs to
* be changed to use another interface.
*/
#ifndef __kernel_old_timeval
struct __kernel_old_timeval {
__kernel_long_t tv_sec;
__kernel_long_t tv_usec;
};
#endif

/*
* The IDs of the various system clocks (for POSIX.1b interval timers):
Expand Down

0 comments on commit bcb3fc3

Please sign in to comment.