Turn on clang's -Wtype-safety to detect fnctl() and ioctl() errors
See:
https://clang.llvm.org/docs/AttributeReference.html#type-safety-checking