summaryrefslogtreecommitdiffstats
path: root/includes.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2017-06-10 23:41:25 +1000
committerDamien Miller <djm@mindrot.org>2017-06-10 23:41:25 +1000
commitbcd1485075aa72ba9418003f5cc27af2b049c51b (patch)
tree122b7024821c2c47b6df71639fe578bf5f571183 /includes.h
parent072e172f1d302d2a2c6043ecbfb4004406717b96 (diff)
portability for sftp globbed ls sort by mtime
Include replacement timespeccmp() for systems that lack it. Support time_t struct stat->st_mtime in addition to timespec stat->st_mtim, as well as unsorted fallback.
Diffstat (limited to 'includes.h')
-rw-r--r--includes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes.h b/includes.h
index 497a038b..0fd71792 100644
--- a/includes.h
+++ b/includes.h
@@ -93,6 +93,9 @@
#ifdef HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* For MIN, MAX, etc */
#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h> /* for timespeccmp if present */
+#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h> /* for MAP_ANONYMOUS */
#endif