From c7c4310f7fc1485925d800628bf50b3aeab535ef Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 10 Jul 2000 23:18:26 +0000 Subject: Merge with Linux 2.4.0-test3-pre8. Linus has accepted most of what I've sent him, so we're very close to full integration of the MIPS port into his sources. --- include/net/sock.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include/net/sock.h') diff --git a/include/net/sock.h b/include/net/sock.h index c0451c111..60756db48 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -515,6 +515,8 @@ struct sock { broadcast, bsdism; unsigned char debug; + unsigned char rcvtstamp; + unsigned char userlocks; int proc; unsigned long lingertime; @@ -1222,7 +1224,7 @@ extern __inline__ long sock_sndtimeo(struct sock *sk, int noblock) extern __inline__ int sock_rcvlowat(struct sock *sk, int waitall, int len) { - return waitall ? len : min(sk->rcvlowat, len); + return (waitall ? len : min(sk->rcvlowat, len)) ? : 1; } /* Alas, with timeout socket operations are not restartable. @@ -1233,6 +1235,15 @@ extern __inline__ int sock_intr_errno(long timeo) return timeo == MAX_SCHEDULE_TIMEOUT ? -ERESTARTSYS : -EINTR; } +static __inline__ void +sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) +{ + if (sk->rcvtstamp) + put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMP, sizeof(skb->stamp), &skb->stamp); + else + sk->stamp = skb->stamp; +} + /* * Enable debug/info messages */ -- cgit v1.2.3