BeBuild.h: Fix B_DEFINE_WEAK_ALIAS for use in C++ code

This commit is contained in:
Ingo Weinhold 2013-11-05 21:25:48 +01:00
parent efe2665986
commit a05e0af507

View File

@ -82,8 +82,14 @@
#define B_DEFINE_SYMBOL_VERSION(function, versionedSymbol) \
__asm__(".symver " function "," versionedSymbol)
#define B_DEFINE_WEAK_ALIAS(name, alias_name) \
__typeof(name) alias_name __attribute__((weak, alias(#name)))
#ifdef __cplusplus
# define B_DEFINE_WEAK_ALIAS(name, alias_name) \
extern "C" __typeof(name) alias_name __attribute__((weak, alias(#name)))
#else
# define B_DEFINE_WEAK_ALIAS(name, alias_name) \
__typeof(name) alias_name __attribute__((weak, alias(#name)))
#endif
#endif /* _BE_BUILD_H */