aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-12-21 14:08:05 -0800
committerUlrich Drepper <drepper@redhat.com>2009-12-21 14:08:05 -0800
commit4286fa41edc33da4cfbc56c2c5902920a52e3184 (patch)
tree330c78ea11d0863a5ca6f131e6eed4e1f2177424 /sysdeps
parentf01c2359ebd4ed130ea0bfa67b59db896cb55cd5 (diff)
downloadglibc-4286fa41edc33da4cfbc56c2c5902920a52e3184.tar
glibc-4286fa41edc33da4cfbc56c2c5902920a52e3184.tar.gz
glibc-4286fa41edc33da4cfbc56c2c5902920a52e3184.tar.bz2
glibc-4286fa41edc33da4cfbc56c2c5902920a52e3184.zip
Handle AT_FDCWD in futimens.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/futimens.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/futimens.c b/sysdeps/unix/sysv/linux/futimens.c
index 67f2588f86..fe8e92070d 100644
--- a/sysdeps/unix/sysv/linux/futimens.c
+++ b/sysdeps/unix/sysv/linux/futimens.c
@@ -33,6 +33,11 @@ int
futimens (int fd, const struct timespec tsp[2])
{
#ifdef __NR_utimensat
+ if (fd < 0)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
return INLINE_SYSCALL (utimensat, 4, fd, NULL, tsp, 0);
#else
__set_errno (ENOSYS);