krytarowski added a subscriber: krytarowski. krytarowski accepted this revision. krytarowski added a reviewer: krytarowski. krytarowski added a comment. You mean `O_RDWR`, not `O_RDRW`. The patch is correct on NetBSD. http://reviews.llvm.org/D13022