diff options
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r-- | include/linux/compat.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 63609398ef9f..9e40be522793 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -731,7 +731,25 @@ asmlinkage long compat_sys_fanotify_mark(int, unsigned int, __u32, __u32, | |||
731 | static inline bool in_compat_syscall(void) { return is_compat_task(); } | 731 | static inline bool in_compat_syscall(void) { return is_compat_task(); } |
732 | #endif | 732 | #endif |
733 | 733 | ||
734 | #else | 734 | /** |
735 | * ns_to_compat_timeval - Compat version of ns_to_timeval | ||
736 | * @nsec: the nanoseconds value to be converted | ||
737 | * | ||
738 | * Returns the compat_timeval representation of the nsec parameter. | ||
739 | */ | ||
740 | static inline struct compat_timeval ns_to_compat_timeval(s64 nsec) | ||
741 | { | ||
742 | struct timeval tv; | ||
743 | struct compat_timeval ctv; | ||
744 | |||
745 | tv = ns_to_timeval(nsec); | ||
746 | ctv.tv_sec = tv.tv_sec; | ||
747 | ctv.tv_usec = tv.tv_usec; | ||
748 | |||
749 | return ctv; | ||
750 | } | ||
751 | |||
752 | #else /* !CONFIG_COMPAT */ | ||
735 | 753 | ||
736 | #define is_compat_task() (0) | 754 | #define is_compat_task() (0) |
737 | static inline bool in_compat_syscall(void) { return false; } | 755 | static inline bool in_compat_syscall(void) { return false; } |