mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix unix_fcntl_nonblock() to not overwrite any existing flags.
This commit is contained in:
parent
d833049dce
commit
757e922c4f
@ -413,9 +413,10 @@ int unix_fcntl_nonblock(int fd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/******************* WINDOWS SPECIFIC PART ******************/
|
||||
/******************* OS SPECIFIC PART ******************/
|
||||
#ifndef WINDOWS_SYS // ie UNIX
|
||||
ret = fcntl(fd, F_SETFL, O_NONBLOCK);
|
||||
int flags = fcntl(fd, F_GETFL);
|
||||
ret = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
|
||||
|
||||
#ifdef NET_DEBUG
|
||||
std::cerr << "unix_fcntl_nonblock():" << ret << " errno:" << errno << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user