Control: tags -1 + patch

I believe the following patch will solve this issue.  It is already
commited to the salsa git repository.

diff --git a/debian/patches/1020-64bit-time.patch 
b/debian/patches/1020-64bit-time.patch
new file mode 100644
index 0000000..9ed3b5e
--- /dev/null
+++ b/debian/patches/1020-64bit-time.patch
@@ -0,0 +1,44 @@
+Description: Use time_t for ctime argument.
+ This ensure the code handle 64 bit time on 32 bit architectures,
+ fixing a build failure:
+    sendgpsinfo.c: In function 'doWaypoint':
+    sendgpsinfo.c:646:46: error: passing argument 1 of 'ctime' from 
incompatible pointer type [-Wincompatible-pointer-types]
+      646 |       if(pkt.has.seconds) printf("%s", ctime(&pkt.seconds));
+          |                                              ^~~~~~~~~~~~
+          |                                              |
+          |                                              long int *
+    In file included from /usr/include/features.h:502,
+                     from 
/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
+                     from /usr/include/stdio.h:28,
+                     from ../include/defs.h:1,
+                     from sendgpsinfo.c:33:
+    /usr/include/time.h:187:14: note: expected 'const time_t *' {aka 'const 
long long int *'} but argument is of type 'long int *'
+      187 | extern char *__REDIRECT_NTH (ctime, (const time_t *__timer), 
__ctime64);
+          |              ^~~~~~~~~~~~~~
+Author: Petter Reinholdtsen <p...@debian.org>
+Bug-Debian: https://bugs.debian.org/1078085
+Forwarded: no
+Last-Update: 2024-08-07
+---
+--- gpstrans-0.41.orig/src/gps/getgpsinfo.c
++++ gpstrans-0.41/src/gps/getgpsinfo.c
+@@ -1127,7 +1127,7 @@ doWaypoint ()
+     struct {
+       /* latitude and longitude are always present */
+       unsigned altitude:1;
+-      unsigned seconds:1;
++      time_t seconds:1;
+       unsigned name:1;
+       unsigned comment:1;
+     } has;
+--- gpstrans-0.41.orig/src/gps/sendgpsinfo.c
++++ gpstrans-0.41/src/gps/sendgpsinfo.c
+@@ -503,7 +503,7 @@ doWaypoint (short type)
+     struct {
+       /* latitude and longitude are always present */
+       unsigned altitude:1;
+-      unsigned seconds:1;
++      time_t seconds:1;
+       unsigned name:1;
+       unsigned comment:1;
+     } has;
diff --git a/debian/patches/series b/debian/patches/series
index e408149..501942c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 05-libgetline-re-enable-posix-macro.diff
 1000-appstream-metainfo.patch
 1010-gl-in-hook-prototype.patch
+1020-64bit-time.patch

-- 
Happy hacking
Petter Reinholdtsen

Reply via email to