Index: src/OFSelectKernelEventObserver.m ================================================================== --- src/OFSelectKernelEventObserver.m +++ src/OFSelectKernelEventObserver.m @@ -48,21 +48,22 @@ - (instancetype)init { self = [super init]; @try { + FD_ZERO(&_readFDs); + FD_ZERO(&_writeFDs); + #ifdef OF_AMIGAOS _maxFD = 0; #else # ifndef OF_WINDOWS if (_cancelFD[0] >= (int)FD_SETSIZE) @throw [OFInitializationFailedException exceptionWithClass: self.class]; # endif - FD_ZERO(&_readFDs); - FD_ZERO(&_writeFDs); FD_SET(_cancelFD[0], &_readFDs); if (_cancelFD[0] > INT_MAX) @throw [OFOutOfRangeException exception]; @@ -170,11 +171,12 @@ fd_set readFDs; fd_set writeFDs; struct timeval timeout; int events; #ifdef OF_AMIGAOS - ULONG execSignalMask, cancelSignal; + BYTE cancelSignal; + ULONG execSignalMask; #endif void *pool; if ([self of_processReadBuffers]) return; @@ -199,11 +201,11 @@ timeout.tv_sec = (long)timeInterval; #endif timeout.tv_usec = (int)((timeInterval - timeout.tv_sec) * 1000000); #ifdef OF_AMIGAOS - if ((cancelSignal = AllocSignal(-1)) == (ULONG)-1) + if ((cancelSignal = AllocSignal(-1)) == (BYTE)-1) @throw [OFObserveFailedException exceptionWithObserver: self errNo: EAGAIN]; execSignalMask = _execSignalMask | (1ul << cancelSignal);