add support for FILPATHLEN -> HAMLIB_FILPATHLEN change at hamlib-4.2

ok sthen@
This commit is contained in:
uaa
2022-01-02 20:23:03 +00:00
parent 1e2a7878eb
commit f6deba442b
2 changed files with 36 additions and 2 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.17 2019/07/12 20:43:48 sthen Exp $
# $OpenBSD: Makefile,v 1.18 2022/01/02 20:23:03 uaa Exp $
PORTROACH= skipv:bm_start
@@ -6,7 +6,7 @@ COMMENT= radio contest logger
DISTNAME= tlf-1.2.1
CATEGORIES= comms hamradio
REVISION= 1
REVISION= 2
HOMEPAGE= http://home.iae.nl/users/reinc/TLF-0.2.html
+34
View File
@@ -0,0 +1,34 @@
--- src/sendqrg.c.orig Thu May 15 20:59:25 2014
+++ src/sendqrg.c Sun Jan 2 19:45:45 2022
@@ -24,6 +24,10 @@
#include "startmsg.h"
+#ifndef HAMLIB_FILPATHLEN
+#define HAMLIB_FILPATHLEN FILPATHLEN
+#endif
+
void send_bandswitch(int trxqrg);
int sendqrg(void)
@@ -118,7 +122,7 @@ int init_tlf_rig(void)
if (strlen(rigportname) > 1) {
rigportname[strlen(rigportname) - 1] = '\0'; // remove '\n'
strncpy(my_rig->state.rigport.pathname, rigportname,
- FILPATHLEN);
+ HAMLIB_FILPATHLEN);
} else
{
showmsg("Missing rig port name!");
@@ -133,9 +137,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, HAMLIB_FILPATHLEN);
if (dcd_file)
- strncpy(my_rig->state.dcdport.pathname, dcd_file, FILPATHLEN);
+ strncpy(my_rig->state.dcdport.pathname, dcd_file, HAMLIB_FILPATHLEN);
my_rig->state.rigport.parm.serial.rate = serial_rate;