chiark / gitweb /
[PATCH] update klibc to version 0.181
[elogind.git] / klibc / klibc / open.c
1 /*
2  * open.c
3  *
4  * On 32-bit platforms we need to pass O_LARGEFILE to the open()
5  * system call, to indicate that we're 64-bit safe.
6  */
7
8 #define _KLIBC_IN_OPEN_C
9 #include <unistd.h>
10 #include <fcntl.h>
11
12 #if BITSIZE == 32 && !defined(__i386__)
13
14 extern int __open(const char *, int, mode_t);
15
16 int open(const char *pathname, int flags, mode_t mode)
17 {
18   return __open(pathname, flags|O_LARGEFILE, mode);
19 }
20
21 #endif