X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Funix%2Fhandle.cpp;h=cb3ce4cae54c16aae8ceb83194044aac98aca94c;hp=307da64fac0a374b32341c05c9092548d69f1ce4;hb=beb12b1ec35ca49512b00668b23caaead1ce8671;hpb=481b844ed7d180ffbf70223075f2fc1ffdb5b444 diff --git a/source/io/unix/handle.cpp b/source/io/unix/handle.cpp index 307da64..cb3ce4c 100644 --- a/source/io/unix/handle.cpp +++ b/source/io/unix/handle.cpp @@ -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)); }