aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/multi.c
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas2017-10-26 11:40:05 +0200
committerGert Doering2017-11-04 19:10:02 +0100
commit31b5c0e9a0c10f59a0e987a9e1f82e9268b30e61 (patch)
treee9dccb77effef236bb48c29af7f382fd15768994 /src/openvpn/multi.c
parent4ac769fb848619dcb39589af29302d8c2d698258 (diff)
downloadopenvpn-31b5c0e9a0c10f59a0e987a9e1f82e9268b30e61.zip
openvpn-31b5c0e9a0c10f59a0e987a9e1f82e9268b30e61.tar.gz
Print time_t as long long and suseconds_t as long
As per previous commit, this is a simple solution to cope with the various sizes of time_t on different archs, including those that use 64 bits time_t on ILP32 archs to cope with y2038. Also: - convert the time_type/time_format abstraction that used unsigned long to inlined long long code - print suseconds_t as a long, which appears to be the underlying type on most Unix systems around Signed-off-by: Jeremie Courreges-Anglas <jca@wxcvbn.org> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <87k1zi18lt.fsf@ritchie.wxcvbn.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15667.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/multi.c')
-rw-r--r--src/openvpn/multi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index c798c43..4545bce 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -2388,14 +2388,14 @@ multi_process_post(struct multi_context *m, struct multi_instance *mi, const uns
multi_set_pending(m, ANY_OUT(&mi->context) ? mi : NULL);
#ifdef MULTI_DEBUG_EVENT_LOOP
- printf("POST %s[%d] to=%d lo=%d/%d w=%d/%d\n",
+ printf("POST %s[%d] to=%d lo=%d/%d w=%lld/%ld\n",
id(mi),
(int) (mi == m->pending),
mi ? mi->context.c2.to_tun.len : -1,
mi ? mi->context.c2.to_link.len : -1,
(mi && mi->context.c2.fragment) ? mi->context.c2.fragment->outgoing.len : -1,
- (int)mi->context.c2.timeval.tv_sec,
- (int)mi->context.c2.timeval.tv_usec);
+ (long long)mi->context.c2.timeval.tv_sec,
+ (long)mi->context.c2.timeval.tv_usec);
#endif
}