Skip to content

Commit 0b2993f

Browse files
committed
Fixed compilation issue - missing RIG_IS_SOFT_ERRCODE under Ubuntu 20.04
1 parent 6949330 commit 0b2993f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

rig/drivers/HamlibRigDrv.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
#define HAMLIB_FILPATHLEN FILPATHLEN
1111
#endif
1212

13+
#ifndef RIG_IS_SOFT_ERRCODE
14+
#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
15+
|| errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
16+
|| errcode == RIG_EVFO || errcode == RIG_EDOM)
17+
18+
#endif
19+
1320
// macro introduced hamlib 4.6
1421
#ifndef PTTPORT
1522
#define PTTPORT(r) (&r->state.pttport)

rotator/drivers/HamlibRotDrv.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
#define HAMLIB_FILPATHLEN FILPATHLEN
2020
#endif
2121

22+
#ifndef RIG_IS_SOFT_ERRCODE
23+
#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
24+
|| errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
25+
|| errcode == RIG_EVFO || errcode == RIG_EDOM)
26+
27+
#endif
28+
2229
#define POOL_INTERVAL 500
2330

2431
MODULE_IDENTIFICATION("qlog.rotator.driver.hamlibdrv");

0 commit comments

Comments
 (0)