OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / uClibc / libc / sysdeps / linux / common / openat.c
1 /*
2  * openat() for uClibc
3  *
4  * Copyright (C) 2009 Analog Devices Inc.
5  *
6  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
7  */
8
9 #define openat __xx_openat
10 #include <sys/syscall.h>
11 #include <fcntl.h>
12 #undef openat
13
14 #ifdef __NR_openat
15 /* The openat() prototype is varargs based, but we don't care about that
16  * here, so need to provide our own dedicated signature.
17  */
18 extern int openat(int fd, const char *file, int oflag, mode_t mode);
19 libc_hidden_proto(openat)
20
21 _syscall4(int, openat, int, fd, const char *, file, int, oflag, mode_t, mode)
22 libc_hidden_def(openat)
23 #else
24 /* should add emulation with open() and /proc/self/fd/ ... */
25 #endif