From 9f1e9b7b8957136695856043f7f82179a65b16b4 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 20 Nov 2001 06:36:09 +0000 Subject: Use fixed-size fields in the structure for the timed protocol. This includes changing a struct timeval to an explicit structure of two int32_t's. This requires using temporary timevals in several places when calling gettimeofday(), settimeofday(), etc. With this timed now works properly on 64-bit platforms such as Alpha. Obtained from: NetBSD --- include/protocols/timed.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/protocols') diff --git a/include/protocols/timed.h b/include/protocols/timed.h index 6c6a05e..75b27ed 100644 --- a/include/protocols/timed.h +++ b/include/protocols/timed.h @@ -31,6 +31,8 @@ * SUCH DAMAGE. * * @(#)timed.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #ifndef _PROTOCOLS_TIMED_H_ @@ -44,11 +46,14 @@ #define ANYADDR NULL struct tsp { - u_char tsp_type; - u_char tsp_vers; - u_short tsp_seq; + u_int8_t tsp_type; + u_int8_t tsp_vers; + u_int16_t tsp_seq; union { - struct timeval tspu_time; + struct { + int32_t tv_sec; + int32_t tv_usec; + } tspu_time; char tspu_hopcnt; } tsp_u; char tsp_name[MAXHOSTNAMELEN]; -- cgit v1.1