]> git.ipfire.org Git - thirdparty/iw.git/commit
iw: Fix timestamp output on 32-bit architectures
authorToke Høiland-Jørgensen <toke@toke.dk>
Thu, 18 Mar 2021 22:46:55 +0000 (23:46 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 19 Mar 2021 12:33:32 +0000 (13:33 +0100)
commit5d9d1b86d1bc5a175ab8709cddf9260a6c1481df
tree9c53cbe9cbee12c1a4aa550e67343edc6e3ce1ac
parent4b25ae3537af48dbf9d0abf94132e5ba01b32c18
iw: Fix timestamp output on 32-bit architectures

On 32-bit architectures, time_t is 32-bit which causes overflows in the
arithmetic involving tv_sec, leading to invalid output. Fix this by
explicitly adding ULL suffixes to the constants used in those calculations.

Fixes: 3708f614dfdd ("iw: Print current time in station info dump")
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://lore.kernel.org/r/20210318224655.143489-1-toke@toke.dk
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
station.c