summaryrefslogtreecommitdiff
path: root/ham
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2021-12-14 23:56:56 +0000
committergdt <gdt@pkgsrc.org>2021-12-14 23:56:56 +0000
commit286c21dc72252aac2b78a4fcce4532213a89cbc7 (patch)
tree01febe0566e068bbb4e2b5139ca155044703d90c /ham
parent7bbdc9a29794bbd12a1861cd14b80af9f4169859 (diff)
downloadpkgsrc-286c21dc72252aac2b78a4fcce4532213a89cbc7.tar.gz
ham/freedv: Patch undefined constant, likely from hamlib
freedv uses FILPATHLEN, which is undefined, and not apparently POSIX. hamlib defines HAMLIB_FILPATHLEN. Speculate that hamlib used to not namespace the constant, that hamlib has been updated, and freedv not, and patch freedv to match. freedv is due for an update anyway, and this can be upstreamed then if it is still an issue.
Diffstat (limited to 'ham')
-rw-r--r--ham/freedv/distinfo3
-rw-r--r--ham/freedv/patches/patch-src_hamlib.cpp17
2 files changed, 19 insertions, 1 deletions
diff --git a/ham/freedv/distinfo b/ham/freedv/distinfo
index d01216d877e..27b82ab9502 100644
--- a/ham/freedv/distinfo
+++ b/ham/freedv/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2021/10/26 10:48:38 nia Exp $
+$NetBSD: distinfo,v 1.9 2021/12/14 23:56:56 gdt Exp $
BLAKE2s (freedv-1.4.2-bb9558cc496b7b253fb54bb28486b0bcd7516ae5.tar.gz) = 99e09f474f7c41b23aac1be374d06a6e1295ad3e658152dead9adc7778096e8c
SHA512 (freedv-1.4.2-bb9558cc496b7b253fb54bb28486b0bcd7516ae5.tar.gz) = fc7589606a208938129ad622966fa108e4c1ee84a86273a1b33705331282e811f7891bbc47528e475742a9b78f4dbc78cc1d84c13e1784b7923de9babf60171d
@@ -6,3 +6,4 @@ Size (freedv-1.4.2-bb9558cc496b7b253fb54bb28486b0bcd7516ae5.tar.gz) = 6177996 by
SHA1 (patch-cmake_FindPortaudio.cmake) = 1105012bc3287bd5044250ad6f1c4609cbf7c217
SHA1 (patch-src_CMakeLists.txt) = 05636fb3c3f836fb8287b16147f5e99a745fb265
SHA1 (patch-src_fdmdv2__main.cpp) = b002f17ecbe8f3091a10bd6854b0400ce50d3105
+SHA1 (patch-src_hamlib.cpp) = fb70eea89bee4df588159018d7ddf2462eff988d
diff --git a/ham/freedv/patches/patch-src_hamlib.cpp b/ham/freedv/patches/patch-src_hamlib.cpp
new file mode 100644
index 00000000000..e264cecccfd
--- /dev/null
+++ b/ham/freedv/patches/patch-src_hamlib.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_hamlib.cpp,v 1.1 2021/12/14 23:56:56 gdt Exp $
+
+Fix semi-obvious use of wrong constant. Perhaps hamlib has prefixed the
+constant to avoid collisions, since this freedv release. Not reported
+upstream because the package is not up to date.
+
+--- src/hamlib.cpp.orig 2020-07-18 23:16:05.000000000 +0000
++++ src/hamlib.cpp
+@@ -114,7 +114,7 @@ bool Hamlib::connect(unsigned int rig_in
+
+ /* TODO we may also need civaddr for Icom */
+
+- strncpy(m_rig->state.rigport.pathname, serial_port, FILPATHLEN - 1);
++ strncpy(m_rig->state.rigport.pathname, serial_port, HAMLIB_FILPATHLEN - 1);
+ if (serial_rate) {
+ fprintf(stderr, "hamlib: setting serial rate: %d\n", serial_rate);
+ m_rig->state.rigport.parm.serial.rate = serial_rate;