From: Mikko Rasa Date: Sat, 2 Dec 2017 14:44:48 +0000 (+0200) Subject: Fix mismatched fcntls in sys_set_blocking on unix X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=beb12b1ec35ca49512b00668b23caaead1ce8671 Fix mismatched fcntls in sys_set_blocking on unix --- 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)); }