fmap.h: Add `extern "C"` to make it compatible to C++.
fmap.h is a C header file. We add `extern "C"` to let C++ code be able
to include it.
BUG=none
TEST=emerge flashmap
successfully build a c++ program which includes fmap.h
Change-Id: I0317ddc9ce7182d69899d7756688ee7dcaded26a
Reviewed-on: https://chromium-review.googlesource.com/505677
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/lib/fmap.h b/lib/fmap.h
index d5809dd..51bd768 100644
--- a/lib/fmap.h
+++ b/lib/fmap.h
@@ -36,6 +36,10 @@
#ifndef FLASHMAP_LIB_FMAP_H__
#define FLASHMAP_LIB_FMAP_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <inttypes.h>
#include <valstr.h>
@@ -190,4 +194,8 @@
/* unit testing stuff */
extern int fmap_test();
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* FLASHMAP_LIB_FMAP_H__*/