summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/defs.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-06-17 23:18:11 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-06-18 10:40:18 +0200
commit69dfe5aeec3d2e08baa033309ac4b84712367ac6 (patch)
tree0d941dca8db309b916d1b63dd1672ec67da38650 /include/osmocom/core/defs.h
parentc2afe81d854ba4e8a1d68d588ffdfc83d14e3323 (diff)
Fix compilation warning on deprecated macro
A warning was printed even if the deprecation didn't apply to libosmocore because it is still allowed to use it internally. This patch fixes this case while still printing a warning if external projects build using libosmocore headers. Change-Id: I32212f20756f828af1017482a71e29e4b3adbad4
Diffstat (limited to 'include/osmocom/core/defs.h')
-rw-r--r--include/osmocom/core/defs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/core/defs.h b/include/osmocom/core/defs.h
index aebe9258..51ac4e51 100644
--- a/include/osmocom/core/defs.h
+++ b/include/osmocom/core/defs.h
@@ -41,6 +41,12 @@
# define OSMO_DEPRECATED(text)
#endif
+#if BUILDING_LIBOSMOCORE
+# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE
+#else
+# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE OSMO_DEPRECATED("For internal use inside libosmocore only.")
+#endif
+
#undef _OSMO_HAS_ATTRIBUTE_DEPRECATED_WITH_MESSAGE
#undef _OSMO_HAS_ATTRIBUTE_DEPRECATED