add open(2) shim to handle O_BINARY and O_CLOEXEC

This commit is contained in:
Brent Cook
2017-01-16 09:56:20 -06:00
parent 51a53876b6
commit f21bd20c7e
4 changed files with 31 additions and 0 deletions

View File

@@ -29,4 +29,10 @@
#define FD_CLOEXEC 1
#endif
int posix_open(const char *path, ...);
#ifndef NO_REDEF_POSIX_FUNCTIONS
#define open(path, ...) posix_open(path, __VA_ARGS__)
#endif
#endif