]> granicus.if.org Git - sudo/commitdiff
Since we need to be able to convert timespec to timeval for
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 14 Jun 2007 11:09:49 +0000 (11:09 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 14 Jun 2007 11:09:49 +0000 (11:09 +0000)
utimes() the last 3 digits in the tv_nsec are not significant.
This makes the sudoedit file date comparison work again.

configure.in

index 036cb7d33c90be09aba7846239bc55a26ac45522..9918bb758108c23e26b027adcd5683d8016e6277 100644 (file)
@@ -2377,14 +2377,16 @@ AH_TOP([#ifndef _SUDO_CONFIG_H
 
 AH_BOTTOM([/*
  * Macros to pull sec and nsec parts of mtime from struct stat.
+ * We need to be able to convert between timeval and timespec
+ * so the last 3 digits of tv_nsec are not significant.
  */
 #ifdef HAVE_ST_MTIM
 # define mtim_getsec(_x)       ((_x).st_mtim.tv_sec)
-# define mtim_getnsec(_x)      ((_x).st_mtim.tv_nsec)
+# define mtim_getnsec(_x)      (((_x).st_mtim.tv_nsec / 1000) * 1000)
 #else
 # ifdef HAVE_ST_MTIMESPEC
 #  define mtim_getsec(_x)      ((_x).st_mtimespec.tv_sec)
-#  define mtim_getnsec(_x)     ((_x).st_mtimespec.tv_nsec)
+#  define mtim_getnsec(_x)     (((_x).st_mtimespec.tv_nsec / 1000) * 1000)
 # else
 #  define mtim_getsec(_x)      ((_x).st_mtime)
 #  define mtim_getnsec(_x)     (0)