Commit c98f4822 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by David S. Miller

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: c7cbdbf2 ("net: rework SIOCGSTAMP ioctl handling")
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fa4122b
...@@ -3004,10 +3004,10 @@ int sock_gettstamp(struct socket *sock, void __user *userstamp, ...@@ -3004,10 +3004,10 @@ int sock_gettstamp(struct socket *sock, void __user *userstamp,
/* beware of padding in sparc64 timeval */ /* beware of padding in sparc64 timeval */
if (timeval && !in_compat_syscall()) { if (timeval && !in_compat_syscall()) {
struct __kernel_old_timeval __user tv = { struct __kernel_old_timeval __user tv = {
.tv_sec = ts.tv_sec; .tv_sec = ts.tv_sec,
.tv_usec = ts.tv_nsec; .tv_usec = ts.tv_nsec,
}; };
if (copy_to_user(userstamp, &tv, sizeof(tv)) if (copy_to_user(userstamp, &tv, sizeof(tv)))
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment