@@ -16,17 +16,17 @@ #define __NO_EXT_QNX #include "config.h" +#include +#include #include #include #include #include -#include - #include #ifndef _WIN32 # include #endif @@ -1484,21 +1484,23 @@ readImplemented = true; if (readFlags == -1) @throw [OFSetOptionFailedException - exceptionWithStream: self]; + exceptionWithStream: self + errNo: errno]; if (enable) readFlags &= ~O_NONBLOCK; else readFlags |= O_NONBLOCK; if (fcntl([self fileDescriptorForReading], F_SETFL, readFlags) == -1) @throw [OFSetOptionFailedException - exceptionWithStream: self]; + exceptionWithStream: self + errNo: errno]; } @catch (OFNotImplementedException *e) { } @try { int writeFlags; @@ -1507,21 +1509,23 @@ writeImplemented = true; if (writeFlags == -1) @throw [OFSetOptionFailedException - exceptionWithStream: self]; + exceptionWithStream: self + errNo: errno]; if (enable) writeFlags &= ~O_NONBLOCK; else writeFlags |= O_NONBLOCK; if (fcntl([self fileDescriptorForWriting], F_SETFL, writeFlags) == -1) @throw [OFSetOptionFailedException - exceptionWithStream: self]; + exceptionWithStream: self + errNo: errno]; } @catch (OFNotImplementedException *e) { } if (!readImplemented && !writeImplemented) @throw [OFNotImplementedException exceptionWithSelector: _cmd