-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sanitise results of stat()/lstat() on Solaris
Solaris 11 (possibly only 11.4) can return negative values for st_atim.tv_nsec, st_mtim.tv_nsec and st_ctim.tv_nsec. Gnulib already identifies this as an issue and works around it with stat_time_normalize(). I've adapted that function for this patch, omitting st_ctim (unused by rsync) and using only a very simple test for time_t overflow. The feature test macros used mean this code path will be used on _all_ Solaris builds, but this shouldn't be an issue; it would probably be safe on anything that provides tv_nsec.
- Loading branch information
Ciaran Anscomb
committed
Jul 7, 2023
1 parent
2f9b963
commit 93296b8
Showing
2 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters