Port libminijail unit tests to C++.
That way they can be run on Android Platform Continuous Testing,
which requires gtest for parsing of test output.
Fix one issue in free_label_strings(), which was not setting
|labels->count| to 0. Also fix some nits in test files.
Bug: 30973585
Change-Id: I8bdb414329aab82e2180d412b9ecc128beab7227
diff --git a/syscall_filter.h b/syscall_filter.h
index 73f3e8a..09c6550 100644
--- a/syscall_filter.h
+++ b/syscall_filter.h
@@ -14,6 +14,10 @@
#define NO_LOGGING 0
#define USE_LOGGING 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct filter_block {
struct sock_filter *instrs;
size_t len;
@@ -37,4 +41,8 @@
int seccomp_can_softfail();
+#ifdef __cplusplus
+}; /* extern "C" */
+#endif
+
#endif /* SYSCALL_FILTER_H */