diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-10 23:18:26 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-10 23:18:26 +0000 |
commit | c7c4310f7fc1485925d800628bf50b3aeab535ef (patch) | |
tree | b12aa4be0e8fb82aaaea97fb475e793e8a347c49 /include/net/sock.h | |
parent | 1ffd1d069ca4c5ffe16fea6175dab1b9bbb15820 (diff) |
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.
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 13 |
1 files changed, 12 insertions, 1 deletions
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 */ |