]> git.tdb.fi Git - libs/core.git/commitdiff
Fix mismatched fcntls in sys_set_blocking on unix
authorMikko Rasa <tdb@tdb.fi>
Sat, 2 Dec 2017 14:44:48 +0000 (16:44 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 2 Dec 2017 14:44:48 +0000 (16:44 +0200)
source/io/unix/handle.cpp

index 307da64fac0a374b32341c05c9092548d69f1ce4..cb3ce4cae54c16aae8ceb83194044aac98aca94c 100644 (file)
@@ -10,7 +10,7 @@ namespace IO {
 
 void sys_set_blocking(Handle &handle, bool b)
 {
-       int flags = fcntl(*handle, F_GETFD);
+       int flags = fcntl(*handle, F_GETFL);
        fcntl(*handle, F_SETFL, (flags&~O_NONBLOCK)|(b?0:O_NONBLOCK));
 }