blob: 9b0897a77927a206b4acf43d6b0d4490c79a8d5b [file] [log] [blame]
/*
* open.c
*
* On 32-bit platforms we need to pass O_LARGEFILE to the open()
* system call, to indicate that we're 64-bit safe.
*/
#define _KLIBC_IN_OPEN_C
#include <unistd.h>
#include <fcntl.h>
#include <bitsize.h>
#if _BITSIZE == 32 && !defined(__i386__)
extern int __open(const char *, int, mode_t);
int open(const char *pathname, int flags, mode_t mode)
{
return __open(pathname, flags | O_LARGEFILE, mode);
}
#endif