1 Index: uClibc-0.9.29/libc/sysdeps/linux/common/openat.c
2 ===================================================================
3 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
4 +++ uClibc-0.9.29/libc/sysdeps/linux/common/openat.c 2008-10-27 12:59:25.000000000 +0100
6 +/* vi: set sw=4 ts=4: */
8 + * openat() for uClibc
10 + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
12 + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
15 +#include <sys/syscall.h>
20 +#include <sys/param.h>
21 +#include <linux/version.h>
23 +extern __typeof(openat) __libc_openat;
25 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52)
26 +#define __NR___syscall_openat __NR_openat
27 +static inline _syscall4(int, __syscall_openat, int, fd, const char *, file,
28 + int, flags, __kernel_mode_t, mode);
30 +libc_hidden_proto(__libc_openat)
31 +int __libc_openat(int fd, const char *file, int oflag, ...)
35 + if (oflag & O_CREAT) {
37 + va_start (arg, oflag);
38 + mode = va_arg (arg, mode_t);
42 + return __syscall_openat(fd, file, oflag, mode);
44 +libc_hidden_def(__libc_openat)
46 +libc_hidden_proto(openat)
47 +weak_alias(__libc_openat,openat)
48 +libc_hidden_weak(openat)
50 Index: uClibc-0.9.29/include/fcntl.h
51 ===================================================================
52 --- uClibc-0.9.29.orig/include/fcntl.h 2008-10-27 12:52:04.000000000 +0100
53 +++ uClibc-0.9.29/include/fcntl.h 2008-10-27 13:08:11.000000000 +0100
55 # define SEEK_END 2 /* Seek from end of file. */
58 -#if 0 /*def __USE_GNU*/
60 # define AT_FDCWD -100 /* Special value used to indicate
61 openat should use the current
64 extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1));
67 -#if 0 /*def __USE_GNU*/
69 /* Similar to OPEN but a relative path name is interpreted relative to
70 the directory for which FD is a descriptor.