chiark / gitweb /
[PATCH] klibc: version 0.211
[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 #include <bitsize.h>
12
13 #if _BITSIZE == 32 && !defined(__i386__)
14
15 extern int __open(const char *, int, mode_t);
16
17 int open(const char *pathname, int flags, mode_t mode)
18 {
19   return __open(pathname, flags|O_LARGEFILE, mode);
20 }
21
22 #endif