summaryrefslogtreecommitdiffstats
path: root/includes.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2017-06-10 15:41:25 +0200
committerDamien Miller <djm@mindrot.org>2017-06-10 15:41:25 +0200
commitbcd1485075aa72ba9418003f5cc27af2b049c51b (patch)
tree122b7024821c2c47b6df71639fe578bf5f571183 /includes.h
parentupstream commit (diff)
downloadopenssh-bcd1485075aa72ba9418003f5cc27af2b049c51b.tar.xz
openssh-bcd1485075aa72ba9418003f5cc27af2b049c51b.zip
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 497a038b2..0fd71792e 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