The return code has been ignored in the past on purpose, because
O_NONBLOCK will fail on BSDs for some special files. This fixes the
problem mentioned in
http://www.haskell.org/pipermail/glasgow-haskell-users/2010-April/018698.html
let flags' | set = flags .|. o_NONBLOCK
| otherwise = flags .&. complement o_NONBLOCK
unless (flags == flags') $ do
- throwErrnoIfMinus1Retry_ "fcntl_write" $
- c_fcntl_write fd const_f_setfl (fromIntegral flags')
+ _ <- c_fcntl_write fd const_f_setfl (fromIntegral flags')
+ return ()
#else
-- bogus defns for win32