aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/tlf-support-hamlib-4.2+.patch
blob: 3c5db1001094ecdb4bcd1cfb88f4aba783e27308 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 295fa956f899af37acb6bda9c76ad77748eb9a4a Mon Sep 17 00:00:00 2001
From: Ervin Hegedus <airween@gmail.com>
Date: Sat, 5 Jun 2021 09:23:06 +0200
Subject: [PATCH] Quick fix for changing of Hamlib's FILPATHLEN macro

This patch was prepared for Guix by Jack Hill <jackhill@jackhill.us> by
squashing together the changes from upstream #268
<https://github.com/Tlf/tlf/pull/268>.

It allows the released version of Tlf to build against the version 4.2 of
hamlib in Guix.

---
 src/sendqrg.c |  6 +++---
 src/sendqrg.h | 10 ++++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/sendqrg.c b/src/sendqrg.c
index ceeb356..5d4420e 100644
--- a/src/sendqrg.c
+++ b/src/sendqrg.c
@@ -87,7 +87,7 @@ int init_tlf_rig(void) {
 
     rigportname[strlen(rigportname) - 1] = '\0';	// remove '\n'
     strncpy(my_rig->state.rigport.pathname, rigportname,
-	    FILPATHLEN - 1);
+	    TLFFILPATHLEN - 1);
 
     caps = my_rig->caps;
 
@@ -104,9 +104,9 @@ int init_tlf_rig(void) {
     if (dcd_type != RIG_DCD_NONE)
 	my_rig->state.dcdport.type.dcd = dcd_type;
     if (ptt_file)
-	strncpy(my_rig->state.pttport.pathname, ptt_file, FILPATHLEN);
+	strncpy(my_rig->state.pttport.pathname, ptt_file, TLFFILPATHLEN);
     if (dcd_file)
-	strncpy(my_rig->state.dcdport.pathname, dcd_file, FILPATHLEN);
+	strncpy(my_rig->state.dcdport.pathname, dcd_file, TLFFILPATHLEN);
 
     my_rig->state.rigport.parm.serial.rate = serial_rate;
 
diff --git a/src/sendqrg.h b/src/sendqrg.h
index 8c53f2e..1ef85a6 100644
--- a/src/sendqrg.h
+++ b/src/sendqrg.h
@@ -23,6 +23,16 @@
 
 #include <hamlib/rig.h>
 
+#ifdef HAMLIB_FILPATHLEN
+  #define TLFFILPATHLEN HAMLIB_FILPATHLEN
+#else
+  #ifdef FILPATHLEN
+  #define TLFFILPATHLEN FILPATHLEN
+  #else
+  #error "(HAMLIB_)FILPATHLEN macro not found"
+  #endif
+#endif
+
 int init_tlf_rig(void);
 void close_tlf_rig(RIG *my_rig);
 
-- 
2.32.0

ickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> ng0 2018-03-15gnu: dmenu: Update to 4.8....* gnu/packages/suckless.scm (dmenu): Update to 4.8. Tobias Geerinckx-Rice 2018-03-02gnu: fortify-headers: Update to 0.9....* gnu/packages/suckless.scm (fortify-headers): Update to 0.9. Tobias Geerinckx-Rice 2018-01-10gnu: blind: Update to 1.1....* gnu/packages/suckless.scm (blind): Update to 1.1. Tobias Geerinckx-Rice 2018-01-10gnu: xbattmon: Update to 1.1....* gnu/packages/suckless.scm (xbattmon): Update to 1.1. Tobias Geerinckx-Rice