diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2018-09-21 21:30:18 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2018-09-21 21:30:18 +0000 |
commit | e7fd895295db6291319af09ffaa3b6d93180788c (patch) | |
tree | 6ad80501db199c916e8fc2ed5648bf694a257675 /libgcompat/unistd.c | |
parent | 938c8095e7456fbcdf4ce261bdb6dfa3a8e41b80 (diff) | |
parent | 9bc7c737b311fcbba71af11884b7f9111dba57ba (diff) | |
download | gcompat-e7fd895295db6291319af09ffaa3b6d93180788c.tar.gz gcompat-e7fd895295db6291319af09ffaa3b6d93180788c.tar.bz2 gcompat-e7fd895295db6291319af09ffaa3b6d93180788c.tar.xz gcompat-e7fd895295db6291319af09ffaa3b6d93180788c.zip |
Merge branch 'patch-3' into 'master'
Add some more functions (notably __cxa_thread_atexit_impl and realpath) and run clang-format
See merge request !3
Diffstat (limited to 'libgcompat/unistd.c')
-rw-r--r-- | libgcompat/unistd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgcompat/unistd.c b/libgcompat/unistd.c index e19ec8e..d2f3097 100644 --- a/libgcompat/unistd.c +++ b/libgcompat/unistd.c @@ -1,4 +1,5 @@ #include <assert.h> /* assert */ +#include <fcntl.h> /* O_CREAT */ #include <limits.h> /* NGROUPS_MAX */ #include <stddef.h> /* NULL, size_t */ #include <unistd.h> /* confstr, getcwd, getgroups, ... */ @@ -90,6 +91,14 @@ pid_t __getpgid(pid_t pid) return getpgid(pid); } +int __open_2(const char *path, int oflag) +{ + assert(!(oflag & O_CREAT)); + + return open(path, oflag); +} +alias(__open_2, __open64_2); + /** * Read from a file, with buffer overflow checking. * |