summaryrefslogtreecommitdiff
path: root/libgcompat
diff options
context:
space:
mode:
Diffstat (limited to 'libgcompat')
-rw-r--r--libgcompat/unistd.c9
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.
*