]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/unix/handle.cpp
Fix mismatched fcntls in sys_set_blocking on unix
[libs/core.git] / source / io / unix / handle.cpp
index 307da64fac0a374b32341c05c9092548d69f1ce4..cb3ce4cae54c16aae8ceb83194044aac98aca94c 100644 (file)
@@ -10,7 +10,7 @@ namespace IO {
 
 void sys_set_blocking(Handle &handle, bool b)
 {
 
 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));
 }
 
        fcntl(*handle, F_SETFL, (flags&~O_NONBLOCK)|(b?0:O_NONBLOCK));
 }