Replaced #if HAVE_X with #ifdef HAVE_X as the former test is troublemaker with #define HAVE_X where #define HAVE_X 1|0 is meant.
diff --git a/json_tokener.c b/json_tokener.c
index 1c82484..47768f4 100644
--- a/json_tokener.c
+++ b/json_tokener.c
@@ -31,6 +31,13 @@
 #include "json_tokener.h"
 #include "json_util.h"
 
+#if !HAVE_STRDUP && defined(_MSC_VER)
+  /* MSC has the version as _strdup */
+# define strdup _strdup
+#elif !HAVE_STRDUP
+# error You do not have strdup on your system.
+#endif /* HAVE_STRDUP */
+
 #if !HAVE_STRNCASECMP && defined(_MSC_VER)
   /* MSC has the version as _strnicmp */
 # define strncasecmp _strnicmp
@@ -38,7 +45,6 @@
 # error You do not have strncasecmp on your system.
 #endif /* HAVE_STRNCASECMP */
 
-
 static const char* json_null_str = "null";
 static const char* json_true_str = "true";
 static const char* json_false_str = "false";