Blame SOURCES/openssh-8.0p1-sftp-timespeccmp.patch

2054b7
diff -up openssh-8.0p1/sftp.c.original openssh-8.0p1/sftp.c
2054b7
--- openssh-8.0p1/sftp.c.original	2020-12-22 17:05:02.105698989 +0900
2054b7
+++ openssh-8.0p1/sftp.c	2020-12-22 17:05:42.922035780 +0900
2054b7
@@ -937,7 +937,11 @@ sglob_comp(const void *aa, const void *b
2054b7
 		return (rmul * strcmp(ap, bp));
2054b7
 	else if (sort_flag & LS_TIME_SORT) {
2054b7
 #if defined(HAVE_STRUCT_STAT_ST_MTIM)
2054b7
-		return (rmul * timespeccmp(&as->st_mtim, &bs->st_mtim, <));
2054b7
+		if (timespeccmp(&as->st_mtim, &bs->st_mtim, <)){
2054b7
+			return rmul;
2054b7
+		} else {
2054b7
+			return -rmul;
2054b7
+		}
2054b7
 #elif defined(HAVE_STRUCT_STAT_ST_MTIME)
2054b7
 		return (rmul * NCMP(as->st_mtime, bs->st_mtime));
2054b7
 #else