Skip to content

Commit b4cf59f

Browse files
committed
libzbc: support C++
Declare all user functions extern "C" when included from a C++ application. Signed-off-by: Damien Le Moal <[email protected]>
1 parent 72df109 commit b4cf59f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/libzbc/zbc.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
#ifndef _LIBZBC_H_
1515
#define _LIBZBC_H_
1616

17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
1721
#include <stdio.h>
1822
#include <unistd.h>
1923
#include <stdbool.h>
@@ -1160,4 +1164,8 @@ extern int zbc_flush(struct zbc_device *dev);
11601164
* @}
11611165
*/
11621166

1167+
#ifdef __cplusplus
1168+
}
1169+
#endif
1170+
11631171
#endif /* _LIBZBC_H_ */

0 commit comments

Comments
 (0)