Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Stephen Rothwell and committed by
David S. Miller
c98f4822 0fa4122b

+3 -3
+3 -3
net/core/sock.c
··· 3004 3004 /* beware of padding in sparc64 timeval */ 3005 3005 if (timeval && !in_compat_syscall()) { 3006 3006 struct __kernel_old_timeval __user tv = { 3007 - .tv_sec = ts.tv_sec; 3008 - .tv_usec = ts.tv_nsec; 3007 + .tv_sec = ts.tv_sec, 3008 + .tv_usec = ts.tv_nsec, 3009 3009 }; 3010 - if (copy_to_user(userstamp, &tv, sizeof(tv)) 3010 + if (copy_to_user(userstamp, &tv, sizeof(tv))) 3011 3011 return -EFAULT; 3012 3012 return 0; 3013 3013 }