From beb12b1ec35ca49512b00668b23caaead1ce8671 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 2 Dec 2017 16:44:48 +0200 Subject: [PATCH] Fix mismatched fcntls in sys_set_blocking on unix --- source/io/unix/handle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- 2.43.0