[openssh-commits] [openssh] 02/02: Supply timespecsub if needed.

git+noreply at mindrot.org git+noreply at mindrot.org
Mon May 5 19:10:06 AEST 2025


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 27861e9b15151898841097c14ee974c026093131
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Mon May 5 19:09:25 2025 +1000

    Supply timespecsub if needed.
---
 defines.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/defines.h b/defines.h
index 3721ae16e..a1bd6fad3 100644
--- a/defines.h
+++ b/defines.h
@@ -515,6 +515,13 @@ struct winsize {
    } while (0)
 #endif
 
+#ifndef timespeccmp
+#define	timespeccmp(tsp, usp, cmp)					\
+	(((tsp)->tv_sec == (usp)->tv_sec) ?				\
+	    ((tsp)->tv_nsec cmp (usp)->tv_nsec) :			\
+	    ((tsp)->tv_sec cmp (usp)->tv_sec))
+#endif
+
 #ifndef TIMEVAL_TO_TIMESPEC
 #define	TIMEVAL_TO_TIMESPEC(tv, ts) {					\
 	(ts)->tv_sec = (tv)->tv_sec;					\

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list