File: time64.patch

package info (click to toggle)
ax25-apps 0.0.8-rc5%2Bgit20230513%2Bafc4a5f-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 852 kB
  • sloc: ansic: 10,902; makefile: 246; sh: 49
file content (19 lines) | stat: -rw-r--r-- 604 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Build as time_t instead of long
Author: Dave Hibberd <hibby@debian.org>
Forwarded: no
Last-Update: 2025-01-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/listen/opentracdump.c
+++ b/listen/opentracdump.c
@@ -148,7 +148,9 @@
 static int decode_timestamp(unsigned char *element, int element_len)
 {
 	/* 0x11 Timestamp - Unix format time (unsigned)  */
-	long rawtime = 0;
+	// This is not a great solution, as opentrac standard only supports 32b
+	// time
+	time_t rawtime = 0;
 
 	rawtime = get32(element);
 	lprintf(T_OPENTRAC, "Time: %s", ctime(&rawtime));