summaryrefslogtreecommitdiffstats
path: root/comm/third_party/json-c/strdup_compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'comm/third_party/json-c/strdup_compat.h')
-rw-r--r--comm/third_party/json-c/strdup_compat.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/comm/third_party/json-c/strdup_compat.h b/comm/third_party/json-c/strdup_compat.h
new file mode 100644
index 0000000000..2f2df65a0d
--- /dev/null
+++ b/comm/third_party/json-c/strdup_compat.h
@@ -0,0 +1,16 @@
+#ifndef __strdup_compat_h
+#define __strdup_compat_h
+
+/**
+ * @file
+ * @brief Do not use, json-c internal, may be changed or removed at any time.
+ */
+
+#if !defined(HAVE_STRDUP) && defined(_MSC_VER)
+/* MSC has the version as _strdup */
+#define strdup _strdup
+#elif !defined(HAVE_STRDUP)
+#error You do not have strdup on your system.
+#endif /* HAVE_STRDUP */
+
+#endif