diff --git a/bus/bus.c b/bus/bus.c index 6b0dc088..f805e3fa 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -1320,7 +1320,12 @@ out: va_end (args); } -static inline const char * +/* TODO: move to autotools generated config.h like done in cmake */ +#ifndef DBUS_INLINE +#define DBUS_INLINE inline +#endif + +static DBUS_INLINE const char * nonnull (const char *maybe_null, const char *if_null) { diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index 6bc6aa56..aa2343ca 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -253,4 +253,10 @@ #define _dbus_verbose_C_S _dbus_verbose #endif +#ifdef _MSC_VER +#define DBUS_INLINE __inline +#else +#define DBUS_INLINE inline +#endif + #endif // _DBUS_CONFIG_H