]> granicus.if.org Git - sysstat/commit
Convert 64-bit time value to time_t as needed
authorChris Bagwell <chris@cnpbagwell.com>
Tue, 12 Apr 2022 19:51:48 +0000 (14:51 -0500)
committerChris Bagwell <chris@cnpbagwell.com>
Tue, 12 Apr 2022 19:51:48 +0000 (14:51 -0500)
commita7628664136cd273b3d91fb9b6d8881d87bd8069
tree38c787238d8f10ff323dd27b5db7ef8223740c6b
parent5c40817fa0a2bdef5de880f8d0bbc1eff4d950c2
Convert 64-bit time value to time_t as needed

On platforms with 32-bit time_t, code up converts it to a 64-bit data
type.  The pointer to this 64-bit value is incorrectly passed to
a few functions that accept a pointer to a 32-bit time_t.

On little endian platforms the original 32-bit time_t value will be visible
this way but on big endian platforms only zeros will be seen and time
will be show as wrong values.

Update code to convert to time_t to be compatible with 32-bit be
platforms.
sa_common.c
sadf.c
sadf_misc.c
svg_stats.c