From 4471ff1b9f2145e662334c27da9ce5d419956022 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 13 Nov 2007 23:29:14 +0000 Subject: 2007-11-13 Thomas Schwinge * io.c (S_io_stat): Adapt to ``struct stat'' changes. --- pflocal/ChangeLog | 4 ++++ pflocal/io.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'pflocal') 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 + + * io.c (S_io_stat): Adapt to ``struct stat'' changes. + 2005-05-17 Neal H. Walfield * 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 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); -- cgit v1.2.3