You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2011/05/04 08:05:21 UTC

DO NOT REPLY [Bug 51146] mtime without fractional seconds when HAVE_STRUCT_STAT_ST_MTIME_N apr/file_io/unix/filestat.c

https://issues.apache.org/bugzilla/show_bug.cgi?id=51146

Ruediger Pluem <rp...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Platform                    |APR
            Version|2.2.17                      |HEAD
            Product|Apache httpd-2              |APR

--- Comment #1 from Ruediger Pluem <rp...@apache.org> 2011-05-04 06:05:21 UTC ---
Indeed this looks like a bug.

The following patch should fix this.

Index: file_io/unix/filestat.c
===================================================================
--- file_io/unix/filestat.c     (Revision 1098497)
+++ file_io/unix/filestat.c     (Arbeitskopie)
@@ -95,7 +95,7 @@
 #elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
     finfo->atime += info->st_atimensec / APR_TIME_C(1000);
 #elif defined(HAVE_STRUCT_STAT_ST_ATIME_N)
-    finfo->ctime += info->st_atime_n / APR_TIME_C(1000);
+    finfo->atime += info->st_atime_n / APR_TIME_C(1000);
 #endif

     apr_time_ansi_put(&finfo->mtime, info->st_mtime);
@@ -104,7 +104,7 @@
 #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
     finfo->mtime += info->st_mtimensec / APR_TIME_C(1000);
 #elif defined(HAVE_STRUCT_STAT_ST_MTIME_N)
-    finfo->ctime += info->st_mtime_n / APR_TIME_C(1000);
+    finfo->mtime += info->st_mtime_n / APR_TIME_C(1000);
 #endif

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org