diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2020-03-29 01:46:27 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2020-03-29 01:46:36 +0700 |
commit | d2e50e7f21ad92c2baf3d57809ea2fe95282b491 (patch) | |
tree | c3d6c772fe1d8a28b3ef4989c6f4bc6a654d84e6 | |
parent | a0cbde700a53bbc804552bbbd1243fe9c6510443 (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.cpp | 3 | ||||
-rw-r--r-- | src/gprs_rlcmac_meas.cpp | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp index 91933a20..58b7e3e1 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 998e01c7..441f58d6 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> |