diff options
author | Florian Fainelli <florian@openwrt.org> | 2008-11-16 17:03:16 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2008-11-16 17:03:16 +0000 |
commit | 86ae448cacce1a2cb1c5091ee54a6ff968b1a068 (patch) | |
tree | fccb52115204830854f7266f784824740f5e9fe5 /toolchain | |
parent | ff1452fdc87091120f28e4c3239b06d1b26588df (diff) | |
download | upstream-86ae448cacce1a2cb1c5091ee54a6ff968b1a068.tar.gz upstream-86ae448cacce1a2cb1c5091ee54a6ff968b1a068.tar.bz2 upstream-86ae448cacce1a2cb1c5091ee54a6ff968b1a068.zip |
openat is not an implemented syscall on linux-2.4, so make it only available for linux-2.6
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13234 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/uClibc/patches/160-add_openat_and_friends.patch | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toolchain/uClibc/patches/160-add_openat_and_friends.patch b/toolchain/uClibc/patches/160-add_openat_and_friends.patch index 74dff7bbf3..e8adbb8fda 100644 --- a/toolchain/uClibc/patches/160-add_openat_and_friends.patch +++ b/toolchain/uClibc/patches/160-add_openat_and_friends.patch @@ -2,7 +2,7 @@ Index: uClibc-0.9.29/libc/sysdeps/linux/common/openat.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ uClibc-0.9.29/libc/sysdeps/linux/common/openat.c 2008-10-27 12:59:25.000000000 +0100 -@@ -0,0 +1,41 @@ +@@ -0,0 +1,44 @@ +/* vi: set sw=4 ts=4: */ +/* + * openat() for uClibc @@ -18,9 +18,11 @@ Index: uClibc-0.9.29/libc/sysdeps/linux/common/openat.c +#include <fcntl.h> +#include <string.h> +#include <sys/param.h> ++#include <linux/version.h> + +extern __typeof(openat) __libc_openat; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,52) +#define __NR___syscall_openat __NR_openat +static inline _syscall4(int, __syscall_openat, int, fd, const char *, file, + int, flags, __kernel_mode_t, mode); @@ -44,6 +46,7 @@ Index: uClibc-0.9.29/libc/sysdeps/linux/common/openat.c +libc_hidden_proto(openat) +weak_alias(__libc_openat,openat) +libc_hidden_weak(openat) ++#endif Index: uClibc-0.9.29/include/fcntl.h =================================================================== --- uClibc-0.9.29.orig/include/fcntl.h 2008-10-27 12:52:04.000000000 +0100 |