mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 06:48:01 +02:00
Win32 compile fix.
msvc compilers define 'inline' only for c++ code, so wrap it with a platform independent DBUS_INLINE define in cmake generated config.h.
This commit is contained in:
parent
2a6c14cd2e
commit
b0b5f9b134
2 changed files with 12 additions and 1 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue