aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-03-29 01:46:27 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2020-03-29 01:46:36 +0700
commitd2e50e7f21ad92c2baf3d57809ea2fe95282b491 (patch)
treec3d6c772fe1d8a28b3ef4989c6f4bc6a654d84e6
parenta0cbde700a53bbc804552bbbd1243fe9c6510443 (diff)
fix: properly include pure C headers from C++ code
Header files included from libosmocore may potentially contain some language constructions allowed in C but not in C++, such as type casting. Let's add 'extern "C" { ... }' and be safe. Change-Id: I7197f7b34f30b49d5397506ce9d67cbf0e2cc196
-rw-r--r--src/gprs_debug.cpp3
-rw-r--r--src/gprs_rlcmac_meas.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp
index 91933a2..58b7e3e 100644
--- a/src/gprs_debug.cpp
+++ b/src/gprs_debug.cpp
@@ -18,8 +18,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+extern "C" {
#include <osmocom/core/utils.h>
#include <osmocom/core/logging.h>
+}
+
#include <gprs_debug.h>
/* default categories */
diff --git a/src/gprs_rlcmac_meas.cpp b/src/gprs_rlcmac_meas.cpp
index 998e01c..441f58d 100644
--- a/src/gprs_rlcmac_meas.cpp
+++ b/src/gprs_rlcmac_meas.cpp
@@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+extern "C" {
#include <osmocom/core/timer_compat.h>
+}
#include <gprs_rlcmac.h>
#include <gprs_debug.h>