From 0f377f943eeb81472fd73189f2c3d8fc65b8c609 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 5 Feb 2018 09:45:42 +0100 Subject: API: don't depend on GLib in ModemManager headers We should only depend on GLib on the libmm-glib headers. Otherwise, packages using just the core headers (e.g. ModemManagerQt) would also need to build-depend on GLib and we don't want to enforce that. cd ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src && ~/buildroot/output/host/usr/bin/arm-cortexa9_neon-linux-gnueabihf-g++ .... -fPIC -o CMakeFiles/KF5ModemManagerQt_static.dir/bearer.cpp.o -c ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src/bearer.cpp In file included from ~/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/ModemManager/ModemManager.h:41:0, from ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src/generictypes.h:27, from ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src/generictypes.cpp:23: ~/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/ModemManager/ModemManager-compat.h:23:18: fatal error: glib.h: No such file or directory compilation terminated. --- include/ModemManager-compat.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/ModemManager-compat.h') diff --git a/include/ModemManager-compat.h b/include/ModemManager-compat.h index 6d65d500..974b69bf 100644 --- a/include/ModemManager-compat.h +++ b/include/ModemManager-compat.h @@ -20,8 +20,6 @@ #error "Only can be included directly." #endif -#include - #include #ifndef MM_DISABLE_DEPRECATED @@ -35,8 +33,15 @@ * avoid unnecessary API/ABI breaks. */ +/* deprecated attribute support since gcc 3.1 */ +#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# define MM_DEPRECATED __attribute__((__deprecated__)) +#else +# define MM_DEPRECATED +#endif + /* The following type exists just so that we can get deprecation warnings */ -G_DEPRECATED +MM_DEPRECATED typedef int MMModemBandDeprecated; /** -- cgit v1.2.3-70-g09d2