diff options
Diffstat (limited to 'lib/stat-time.h')
-rw-r--r-- | lib/stat-time.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stat-time.h b/lib/stat-time.h index 8e787bd3b2d..69ebe85df1d 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -213,7 +213,7 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED) #if defined __sun && defined STAT_TIMESPEC if (result == 0) { - long int timespec_resolution = 1000000000; + long int timespec_hz = 1000000000; short int const ts_off[] = { offsetof (struct stat, st_atim), offsetof (struct stat, st_mtim), offsetof (struct stat, st_ctim) }; @@ -221,11 +221,11 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED) for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++) { struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]); - long int q = ts->tv_nsec / timespec_resolution; - long int r = ts->tv_nsec % timespec_resolution; + long int q = ts->tv_nsec / timespec_hz; + long int r = ts->tv_nsec % timespec_hz; if (r < 0) { - r += timespec_resolution; + r += timespec_hz; q--; } ts->tv_nsec = r; |