From dc5e1bf6edcce1f2f748e6e3bc442870e8ea875e Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Thu, 25 Feb 2021 11:55:57 -0600 Subject: [PATCH] Fix rig_get_caps_int to return long long for cross platform compatibility https://github.com/Hamlib/Hamlib/issues/562 --- include/hamlib/rig.h | 2 +- src/misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index b49b36206..702df0123 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1971,7 +1971,7 @@ enum rig_caps_cptr_e { * */ //! @cond Doxygen_Suppress -extern long rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps); +extern long long rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps); /** * \brief Function to return char pointer value from rig->caps diff --git a/src/misc.c b/src/misc.c index 45619c6ff..008cab33a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2146,7 +2146,7 @@ void *rig_get_function_ptr(rig_model_t rig_model, * \param RIG* and rig_caps_int_e * \return the corresponding long value -- -RIG_EINVAL is the only error possible */ -long rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps) +long long rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps) { const struct rig_caps *caps = rig_get_caps(rig_model);