summaryrefslogtreecommitdiff
path: root/runopts.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2022-12-01 11:34:43 +0800
committerMatt Johnston <matt@ucc.asn.au>2022-12-01 13:40:13 +0800
commitec2215726cffb976019d08ebf569edd2229e9dba (patch)
treea527cda2dfb85d0686f23c5b6354b8b7cbcba8d5 /runopts.h
parentbd94cb712c2e34979bf1a1a4f0eecccc1d0aec4d (diff)
downloaddropbear-ec2215726cffb976019d08ebf569edd2229e9dba.tar.gz
Fix y2038 issues with time_t conversion
These changes were identified by building with and without -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 on 32-bit arm, logging warnings to files. -Wconversion was added to CFLAGS in both builds. Then a "diff -I Wconversion log1 log2" shows new warnings that appear with the 64-bit time_t. There are a few false positives that have been fixed for quietness. struct logininfo and struct wtmp are still problematic, those will need to be handled by libc.
Diffstat (limited to 'runopts.h')
-rw-r--r--runopts.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runopts.h b/runopts.h
index 1675836..d44283d 100644
--- a/runopts.h
+++ b/runopts.h
@@ -39,8 +39,8 @@ typedef struct runopts {
int listen_fwd_all;
#endif
unsigned int recv_window;
- time_t keepalive_secs; /* Time between sending keepalives. 0 is off */
- time_t idle_timeout_secs; /* Exit if no traffic is sent/received in this time */
+ long keepalive_secs; /* Time between sending keepalives. 0 is off */
+ long idle_timeout_secs; /* Exit if no traffic is sent/received in this time */
int usingsyslog;
#ifndef DISABLE_ZLIB