blob: 8e5baa0c59aed0b31425f092e41eb0beb6517ade [file] [log] [blame]
/*
* openat.c
*
* On 32-bit platforms we need to pass O_LARGEFILE to the openat()
* 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__) && !defined(__m68k__) && defined(__NR_openat)
extern int __openat(int, const char *, int, mode_t);
int openat(int dirfd, const char *pathname, int flags, mode_t mode)
{
return __openat(dirfd, pathname, flags | O_LARGEFILE, mode);
}
#endif