Change in osmo-pcu[master]: fix: properly include pure C headers from C++ code

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sat Mar 28 20:12:59 UTC 2020


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17652 )

Change subject: fix: properly include pure C headers from C++ code
......................................................................

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
---
M src/gprs_debug.cpp
M src/gprs_rlcmac_meas.cpp
2 files changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



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>

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17652
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I7197f7b34f30b49d5397506ce9d67cbf0e2cc196
Gerrit-Change-Number: 17652
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200328/0941dd39/attachment.htm>


More information about the gerrit-log mailing list