summaryrefslogtreecommitdiff
path: root/libfshelp
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-11-13 23:15:42 +0000
committerThomas Schwinge <tschwinge@gnu.org>2007-11-13 23:15:42 +0000
commita592d6796c6e61b51fc5eff258c294562d26e0cb (patch)
treebb6ad031c2c5c80532edd780faa465e53ae389a5 /libfshelp
parent2b90938e0521ff32d1fd79a4a14d2204c61799ff (diff)
2007-11-13 Thomas Schwinge <tschwinge@gnu.org>
* touch.c (fshelp_touch): Adapt to ``struct stat'' changes.
Diffstat (limited to 'libfshelp')
-rw-r--r--libfshelp/ChangeLog4
-rw-r--r--libfshelp/touch.c15
2 files changed, 12 insertions, 7 deletions
diff --git a/libfshelp/ChangeLog b/libfshelp/ChangeLog
index b646c06d..67b418e8 100644
--- a/libfshelp/ChangeLog
+++ b/libfshelp/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-13 Thomas Schwinge <tschwinge@gnu.org>
+
+ * touch.c (fshelp_touch): Adapt to ``struct stat'' changes.
+
2006-06-28 Thomas Schwinge <tschwinge@gnu.org>
* Makefile (HURDLIBS): Add `iohelp' and `ports'.
diff --git a/libfshelp/touch.c b/libfshelp/touch.c
index c254bfbf..00d90edd 100644
--- a/libfshelp/touch.c
+++ b/libfshelp/touch.c
@@ -1,5 +1,6 @@
/*
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+
Written by Thomas Bushnell, BSG.
This file is part of the GNU Hurd.
@@ -32,17 +33,17 @@ fshelp_touch (struct stat *st, unsigned what,
if (what & TOUCH_ATIME)
{
- st->st_atime = tv.tv_sec;
- st->st_atime_usec = tv.tv_usec;
+ st->st_atim.tv_sec = tv.tv_sec;
+ st->st_atim.tv_nsec = tv.tv_usec * 1000;
}
if (what & TOUCH_CTIME)
{
- st->st_ctime = tv.tv_sec;
- st->st_ctime_usec = tv.tv_usec;
+ st->st_ctim.tv_sec = tv.tv_sec;
+ st->st_ctim.tv_nsec = tv.tv_usec * 1000;
}
if (what & TOUCH_MTIME)
{
- st->st_mtime = tv.tv_sec;
- st->st_mtime_usec = tv.tv_usec;
+ st->st_mtim.tv_sec = tv.tv_sec;
+ st->st_mtim.tv_nsec = tv.tv_usec * 1000;
}
}