Debian Codegraph @

debian/patches/time64.patch

raw
1 From: Dave Hibberd <[email protected]>
2 Date: Tue, 16 Sep 2025 22:35:26 +0100
3 Subject: Build as time_t instead of long
4
5 Forwarded: no
6 Last-Update: 2025-01-08
7
8 Last-Update: 2025-01-08
9 ---
10 listen/opentracdump.c | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13 diff --git a/listen/opentracdump.c b/listen/opentracdump.c
14 index 25dbcf2..e07fe70 100644
15 --- a/listen/opentracdump.c
16 +++ b/listen/opentracdump.c
17 @@ -148,7 +148,9 @@ static int decode_position(unsigned char *element, int element_len)
18 static int decode_timestamp(unsigned char *element, int element_len)
19 {
20 /* 0x11 Timestamp - Unix format time (unsigned) */
21 - long rawtime = 0;
22 + // This is not a great solution, as opentrac standard only supports 32b
23 + // time
24 + time_t rawtime = 0;
25
26 rawtime = get32(element);
27 lprintf(T_OPENTRAC, "Time: %s", ctime(&rawtime));