Mercurial > hg > aboriginal
changeset 952:f15bb93793e2
INLINE_SYSCALL isn't there on all targets, so switch to stuff that is. (This is kind of disgusting, but the problem's already been fixed in -dev so either there will someday be a new release, or it won't matter.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 14 Jan 2010 23:47:17 -0600 |
parents | e6fd6f4fe67d |
children | 8e18463c3d71 |
files | sources/patches/uClibc-futimes.patch |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/patches/uClibc-futimes.patch Thu Jan 14 23:45:14 2010 -0600 +++ b/sources/patches/uClibc-futimes.patch Thu Jan 14 23:47:17 2010 -0600 @@ -14,7 +14,7 @@ #endif --- /dev/null 2009-08-01 20:56:12.000000000 -0500 +++ uClibc2/libc/sysdeps/linux/common/futimes.c 2009-11-14 04:53:49.000000000 -0600 -@@ -0,0 +1,33 @@ +@@ -0,0 +1,39 @@ +/* vi: set sw=4 ts=4: */ +/* + * futimes() for uClibc @@ -24,7 +24,8 @@ + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + -+#include <sys/syscall.h> ++#define _SYSCALL_H ++#include <bits/syscalls.h> +#include <utime.h> +#include <sys/time.h> + @@ -34,6 +35,8 @@ +int futimes(const int fd, const struct timeval tvp[2]) +{ + struct timespec ts[2], *pts = ts; ++ int ret; ++ INTERNAL_SYSCALL_DECL(err); + + /* Convert timeval to timespec, for syscall */ + @@ -44,7 +47,10 @@ + + /* Make syscall */ + -+ return INLINE_SYSCALL(utimensat, 4, fd, 0, pts, 0); ++ ret = INTERNAL_SYSCALL_NCS(utimensat, dummy, 4, fd, 0, pts, 0); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; +} +libc_hidden_def(futimes) +#endif