Add extern "C" to all the adb headers.
Change-Id: Iaefa3e18d6ee2e065eb97271a796613b2a8e7d6e
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index 086dd61..ec847b5 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -39,6 +39,10 @@
#include "fdevent.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define OS_PATH_SEPARATOR '\\'
#define OS_PATH_SEPARATOR_STR "\\"
#define ENV_PATH_SEPARATOR_STR ";"
@@ -260,6 +264,10 @@
extern char* adb_strtok_r(char *str, const char *delim, char **saveptr);
+#ifdef __cplusplus
+}
+#endif
+
#else /* !_WIN32 a.k.a. Unix */
#include "fdevent.h"
@@ -279,6 +287,10 @@
#include <string.h>
#include <unistd.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* TEMP_FAILURE_RETRY is defined by some, but not all, versions of
* <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
@@ -534,4 +546,8 @@
#endif /* !_WIN32 */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ADB_SYSDEPS_H */