bdev: guard bdev_module.h with extern "C"
so the functions declared in this header file are not mangled by the C++ compiler when building, for instance, a bdev driver, implemented in C++. Signed-off-by: Kefu Chai <tchaikov@gmail.com> Change-Id: I5a5d1abb06d0d3cd5f5d9245bb7c080f3874e83b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10745 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
bf815486fc
commit
796ba5ce69
@ -52,6 +52,10 @@
|
||||
#include "spdk/util.h"
|
||||
#include "spdk/uuid.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Block device module */
|
||||
struct spdk_bdev_module {
|
||||
/**
|
||||
@ -1290,4 +1294,8 @@ static void __attribute__((constructor)) _spdk_bdev_module_register_##name(void)
|
||||
|
||||
#endif /* __SPDK_BDEV_MODULE_ONLY */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPDK_BDEV_MODULE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user