aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-06-04 11:42:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-04 11:42:29 +0000
commit276b0dae0bde07ef8f4c294def3bbd5bca76f9ca (patch)
tree868ea23a63fe8f57c789db1b8d5714969ba0eb85 /main/libc0.9.32
parentdd995e7df37a946a72580633ca07a5cef126c7c9 (diff)
downloadaports-276b0dae0bde07ef8f4c294def3bbd5bca76f9ca.tar.bz2
aports-276b0dae0bde07ef8f4c294def3bbd5bca76f9ca.tar.xz
main/libc0.9.32: add lutimes patch
Diffstat (limited to 'main/libc0.9.32')
-rw-r--r--main/libc0.9.32/APKBUILD4
-rw-r--r--main/libc0.9.32/uclibc-lutimes.patch105
2 files changed, 108 insertions, 1 deletions
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD
index 21783636d6..accdcaf3af 100644
--- a/main/libc0.9.32/APKBUILD
+++ b/main/libc0.9.32/APKBUILD
@@ -3,7 +3,7 @@ _abiver=0.9.32
pkgname=libc$_abiver
_gitver=1006041126
pkgver=${_abiver}_alpha0_git$_gitver
-pkgrel=0
+pkgrel=1
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
@@ -18,6 +18,7 @@ _snapfile="$pkgname-$pkgver.tar.bz2"
source="http://build.alpinelinux.org:8010/distfiles/$_snapfile
compat-stack-guard.patch
uclibc-libm-pic.patch
+ uclibc-lutimes.patch
uclibc-resolv-tls.patch
uclibcconfig.x86
uclibcconfig.i486
@@ -98,6 +99,7 @@ utils() {
md5sums="048f92606460621d9402c43417392992 libc0.9.32-0.9.32_alpha0_git1006041126.tar.bz2
4d408f72142ce55a0754948cc9cfe447 compat-stack-guard.patch
2f9739a980be24a842c57516155c7885 uclibc-libm-pic.patch
+4d0b8170e6580b47bf5775e65a6f081e uclibc-lutimes.patch
d08831b452acdeaa3037525ee617edab uclibc-resolv-tls.patch
e2eb3bb00a0fe4d6f3d5b5c56b027bab uclibcconfig.x86
e2eb3bb00a0fe4d6f3d5b5c56b027bab uclibcconfig.i486"
diff --git a/main/libc0.9.32/uclibc-lutimes.patch b/main/libc0.9.32/uclibc-lutimes.patch
new file mode 100644
index 0000000000..c9ec2aa475
--- /dev/null
+++ b/main/libc0.9.32/uclibc-lutimes.patch
@@ -0,0 +1,105 @@
+From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+To: uclibc@uclibc.org
+Subject: [PATCH v2] lutimes: add lutimes support
+Date: Wed, 2 Jun 2010 10:27:16 +0400
+Message-Id: <1275460036-3289-1-git-send-email-vzapolskiy@gmail.com>
+X-Mailer: git-send-email 1.7.0.3
+In-Reply-To: <1275420197-32262-1-git-send-email-vzapolskiy@gmail.com>
+References: <1275420197-32262-1-git-send-email-vzapolskiy@gmail.com>
+Cc: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+X-BeenThere: uclibc@uclibc.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: "Discussion and development of uClibc \(the embedded C library\)"
+ <uclibc.uclibc.org>
+List-Unsubscribe: <http://lists.busybox.net/mailman/options/uclibc>,
+ <mailto:uclibc-request@uclibc.org?subject=unsubscribe>
+List-Archive: <http://lists.busybox.net/pipermail/uclibc>
+List-Post: <mailto:uclibc@uclibc.org>
+List-Help: <mailto:uclibc-request@uclibc.org?subject=help>
+List-Subscribe: <http://lists.busybox.net/mailman/listinfo/uclibc>,
+ <mailto:uclibc-request@uclibc.org?subject=subscribe>
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Sender: uclibc-bounces@uclibc.org
+Errors-To: uclibc-bounces@uclibc.org
+
+This patch adds lutimes library call support.
+
+Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+---
+ include/sys/time.h | 4 ++-
+ libc/sysdeps/linux/common/lutimes.c | 38 +++++++++++++++++++++++++++++++++++
+ 2 files changed, 41 insertions(+), 1 deletions(-)
+ create mode 100644 libc/sysdeps/linux/common/lutimes.c
+
+diff --git a/include/sys/time.h b/include/sys/time.h
+index 33f5873..952e95a 100644
+--- a/include/sys/time.h
++++ b/include/sys/time.h
+@@ -144,14 +144,16 @@ extern int utimes (__const char *__file, __const struct timeval __tvp[2])
+ __THROW __nonnull ((1));
+ libc_hidden_proto(utimes)
+
+-#if 0 /*def __USE_BSD*/
++#ifdef __USE_BSD
+ /* Same as `utimes', but does not follow symbolic links. */
+ extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
+ __THROW __nonnull ((1));
+
++#if 0
+ /* Same as `utimes', but takes an open file descriptor instead of a name. */
+ extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW;
+ #endif
++#endif
+
+ #ifdef __USE_GNU
+ /* Change the access time of FILE relative to FD to TVP[0] and the
+diff --git a/libc/sysdeps/linux/common/lutimes.c b/libc/sysdeps/linux/common/lutimes.c
+new file mode 100644
+index 0000000..0b4a8ea
+--- /dev/null
++++ b/libc/sysdeps/linux/common/lutimes.c
+@@ -0,0 +1,38 @@
++/* vi: set sw=4 ts=4: */
++/*
++ * lutimes() implementation for uClibc
++ *
++ * Copyright (C) 2010 Vladimir Zapolskiy <vzapolskiy@gmail.com>
++ *
++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
++ */
++
++#include <sys/syscall.h>
++#include <time.h>
++
++#ifdef __NR_lutimes
++_syscall2(int, lutimes, const char *, file, const struct timeval *, tvp)
++#else
++#include <sys/time.h>
++#include <fcntl.h>
++
++int lutimes(const char *file, const struct timeval tvp[2])
++{
++ struct timespec ts[2];
++
++ if (tvp != NULL)
++ {
++ if (tvp[0].tv_usec < 0 || tvp[0].tv_usec >= 1000000
++ || tvp[1].tv_usec < 0 || tvp[1].tv_usec >= 1000000)
++ {
++ __set_errno(EINVAL);
++ return -1;
++ }
++
++ TIMEVAL_TO_TIMESPEC(&tvp[0], &ts[0]);
++ TIMEVAL_TO_TIMESPEC(&tvp[1], &ts[1]);
++ }
++
++ return utimensat(AT_FDCWD, file, tvp ? ts : NULL, AT_SYMLINK_NOFOLLOW);
++}
++#endif
+--
+1.7.0.3
+