Skip to content

Commit 9452a60

Browse files
committed
Fix: Kernel 4.10.0 got rid of an union
In kernel commit 2456e85535 was a cleanup where an union was removed. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2456e855354415bfaeb7badaa14e11b3e02c8466 and https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/include/linux/futex.h?id=2456e855354415bfaeb7badaa14e11b3e02c8466 for further background information. Reported-by: iysheng <iysheng@163.com>
1 parent 1ed0185 commit 9452a60

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

module/tty0tty.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ static int tty0tty_write(struct tty_struct *tty, const unsigned char *buffer,
228228
int retval = 0;
229229
struct tty_struct *ttyx = NULL;
230230
u64 elapsed, delay;
231+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
231232
ktime_t start_time = ktime_get_ns();
233+
#else
234+
u64 start_time = ktime_get_ns();
235+
#endif
232236

233237
if (!tty0tty)
234238
return -ENODEV;

0 commit comments

Comments
 (0)