summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-11-13 23:29:14 +0000
committerThomas Schwinge <tschwinge@gnu.org>2007-11-13 23:29:14 +0000
commit4471ff1b9f2145e662334c27da9ce5d419956022 (patch)
tree923821788898bf2364796342faaec024a92b4aa6
parent63ed56840692629ee9853b6ce349a9c1ca0c96e9 (diff)
2007-11-13 Thomas Schwinge <tschwinge@gnu.org>
* io.c (S_io_stat): Adapt to ``struct stat'' changes.
-rw-r--r--pflocal/ChangeLog4
-rw-r--r--pflocal/io.c14
2 files changed, 12 insertions, 6 deletions
diff --git a/pflocal/ChangeLog b/pflocal/ChangeLog
index f12686c0..e36529d0 100644
--- a/pflocal/ChangeLog
+++ b/pflocal/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-13 Thomas Schwinge <tschwinge@gnu.org>
+
+ * io.c (S_io_stat): Adapt to ``struct stat'' changes.
+
2005-05-17 Neal H. Walfield <neal@gnu.org>
* sock.c (sock_free): Don't destroy SOCK->CONNECT_QUEUE.
diff --git a/pflocal/io.c b/pflocal/io.c
index bd9ecbdd..74c2f970 100644
--- a/pflocal/io.c
+++ b/pflocal/io.c
@@ -1,6 +1,8 @@
/* Socket I/O operations
- Copyright (C) 1995,96,98,99,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998, 1999, 2000, 2002, 2007
+ Free Software Foundation, Inc.
+
Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
@@ -272,10 +274,10 @@ S_io_stat (struct sock_user *user, struct stat *st)
struct sock *sock;
struct pipe *rpipe, *wpipe;
- void copy_time (time_value_t *from, time_t *to_sec, unsigned long *to_usec)
+ void copy_time (time_value_t *from, time_t *to_sec, unsigned long *to_nsec)
{
*to_sec = from->seconds;
- *to_usec = from->microseconds;
+ *to_nsec = from->microseconds * 1000;
}
if (!user)
@@ -300,7 +302,7 @@ S_io_stat (struct sock_user *user, struct stat *st)
if (rpipe)
{
mutex_lock (&rpipe->lock);
- copy_time (&rpipe->read_time, &st->st_atime, &st->st_atime_usec);
+ copy_time (&rpipe->read_time, &st->st_atim.tv_sec, &st->st_atim.tv_nsec);
/* This seems useful. */
st->st_size = pipe_readable (rpipe, 1);
mutex_unlock (&rpipe->lock);
@@ -309,11 +311,11 @@ S_io_stat (struct sock_user *user, struct stat *st)
if (wpipe)
{
mutex_lock (&wpipe->lock);
- copy_time (&wpipe->write_time, &st->st_mtime, &st->st_mtime_usec);
+ copy_time (&wpipe->write_time, &st->st_mtim.tv_sec, &st->st_mtim.tv_nsec);
mutex_unlock (&wpipe->lock);
}
- copy_time (&sock->change_time, &st->st_ctime, &st->st_ctime_usec);
+ copy_time (&sock->change_time, &st->st_ctim.tv_sec, &st->st_ctim.tv_nsec);
mutex_unlock (&sock->lock);