Add extern "C" to headers
Add extern "C" to headers so that they can be included by cpp code.
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/libmctp-serial.h b/libmctp-serial.h
index 0d3b972..68f184e 100644
--- a/libmctp-serial.h
+++ b/libmctp-serial.h
@@ -3,6 +3,10 @@
#ifndef _LIBMCTP_SERIAL_H
#define _LIBMCTP_SERIAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "libmctp.h"
struct mctp_binding_serial;
@@ -16,4 +20,8 @@
const char *path);
void mctp_serial_open_fd(struct mctp_binding_serial *serial, int fd);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LIBMCTP_SERIAL_H */
diff --git a/libmctp.h b/libmctp.h
index 28903d7..d1696a4 100644
--- a/libmctp.h
+++ b/libmctp.h
@@ -3,6 +3,10 @@
#ifndef _LIBMCTP_H
#define _LIBMCTP_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdint.h>
typedef uint8_t mctp_eid_t;
@@ -90,4 +94,8 @@
void *(realloc)(void *, size_t));
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LIBMCTP_H */