Fix linux compilation

This commit is contained in:
=
2020-07-10 19:25:59 +09:30
parent 34e59a7d87
commit 2cb65bc2ff

View File

@@ -383,13 +383,15 @@ public class SerialPort {
}
dtrState = value
var flags = TIOCM_DTR
ioctl(fileDescriptor, dtrState ? TIOCMBIS : TIOCMBIC, &flags)
if(ioctl(fileDescriptor, UInt(dtrState ? TIOCMBIS : TIOCMBIC), &flags) != 0){
print("Failed to apply dtr")
}
}
}
public var inWaiting: Int {
get{
return Int(ioctl(fileDescriptor!, FIONREAD))
return Int(ioctl(fileDescriptor!, UInt(FIONREAD)))
}
}
}