summaryrefslogtreecommitdiffhomepage
path: root/dbutil.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-10-15 19:55:15 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-10-15 19:55:15 +0800
commit0e3e8db5bfca0c579be55e7580a46c593c1384be (patch)
tree2b1a718f633fb95c1f2d689a591cf9e8642697f3 /dbutil.h
parent78e17f6ee9a944430da3e517ee1fe384fd6b275b (diff)
parent17873e8c922eded2cec86184673a6d110df6403f (diff)
merge from main
--HG-- branch : fuzz
Diffstat (limited to 'dbutil.h')
-rw-r--r--dbutil.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/dbutil.h b/dbutil.h
index 7d1c3e1..2a1c82c 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -83,9 +83,18 @@ int constant_time_memcmp(const void* a, const void *b, size_t n);
/* Returns a time in seconds that doesn't go backwards - does not correspond to
a real-world clock */
time_t monotonic_now(void);
+/* Higher resolution clock_gettime(CLOCK_MONOTONIC) wrapper */
+void gettime_wrapper(struct timespec *now);
char * expand_homedir_path(const char *inpath);
void fsync_parent_dir(const char* fn);
+#if DROPBEAR_MSAN
+/* FD_ZERO seems to leave some memory uninitialized. clear it to avoid false positives */
+#define DROPBEAR_FD_ZERO(fds) do { memset((fds), 0x0, sizeof(fd_set)); FD_ZERO(fds); } while(0)
+#else
+#define DROPBEAR_FD_ZERO(fds) FD_ZERO(fds)
+#endif
+
#endif /* DROPBEAR_DBUTIL_H_ */