From: Stephen Rothwell Date: Tue, 23 Apr 2019 07:25:24 +0000 (+1000) Subject: net: fix sparc64 compilation of sock_gettstamp X-Git-Tag: microblaze-v5.4-rc1~787^2~117 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=c98f4822ed7e02ff91fd29707218779718cf60f9;p=linux-2.6-microblaze.git net: fix sparc64 compilation of sock_gettstamp net/core/sock.c: In function 'sock_gettstamp': net/core/sock.c:3007:23: error: expected '}' before ';' token .tv_sec = ts.tv_sec; ^ net/core/sock.c:3011:4: error: expected ')' before 'return' return -EFAULT; ^~~~~~ net/core/sock.c:3013:2: error: expected expression before '}' token } ^ Fixes: c7cbdbf29f48 ("net: rework SIOCGSTAMP ioctl handling") Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller --- diff --git a/net/core/sock.c b/net/core/sock.c index 443b98d05f1e..925b84a872dd 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3004,10 +3004,10 @@ int sock_gettstamp(struct socket *sock, void __user *userstamp, /* beware of padding in sparc64 timeval */ if (timeval && !in_compat_syscall()) { struct __kernel_old_timeval __user tv = { - .tv_sec = ts.tv_sec; - .tv_usec = ts.tv_nsec; + .tv_sec = ts.tv_sec, + .tv_usec = ts.tv_nsec, }; - if (copy_to_user(userstamp, &tv, sizeof(tv)) + if (copy_to_user(userstamp, &tv, sizeof(tv))) return -EFAULT; return 0; }