contrib/libxo: fix API header files inclusions in C++ source files
C++ source files need `extern "C"` to disable C++ name mangling. MFC after: 1 week Reviewed by: aokblast (previous version), phil, imp (previous version) Differential Revision: https://reviews.freebsd.org/D47930
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __dead2
|
||||
#define NORETURN __dead2
|
||||
#else
|
||||
@@ -699,4 +703,8 @@ xo_retain_clear_all (void);
|
||||
void
|
||||
xo_retain_clear (const char *fmt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* INCLUDE_XO_H */
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Expose libxo's memory allocation functions
|
||||
*/
|
||||
@@ -167,4 +171,8 @@ xo_encoder_op_name (xo_encoder_op_t op);
|
||||
void
|
||||
xo_failure (xo_handle_t *xop, const char *fmt, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* XO_ENCODER_H */
|
||||
|
||||
Reference in New Issue
Block a user