mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r19101: add sys_recv() wrapper
metze
(This used to be commit 2f146ec683
)
This commit is contained in:
parent
4366ca702d
commit
0a32e31cbe
@ -105,7 +105,6 @@ ssize_t sys_write(int fd, const void *buf, size_t count)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
A pread wrapper that will deal with EINTR and 64-bit file offsets.
|
||||
********************************************************************/
|
||||
@ -174,6 +173,20 @@ ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
A write wrapper that will deal with EINTR.
|
||||
********************************************************************/
|
||||
|
||||
ssize_t sys_recv(int fd, void *buf, size_t count, int flags)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
do {
|
||||
ret = recv(fd, buf, count, flags);
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
A recvfrom wrapper that will deal with EINTR.
|
||||
********************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user