jplist: Fix build on Windows
diff --git a/src/jplist.c b/src/jplist.c
index 08441c0..218d75a 100644
--- a/src/jplist.c
+++ b/src/jplist.c
@@ -65,6 +65,18 @@
     /* deinit JSON stuff */
 }
 
+#ifndef HAVE_STRNDUP
+static char* strndup(char* str, size_t len)
+{
+    char *newstr = (char *)malloc(len+1);
+    if (newstr) {
+        strncpy(newstr, str, len);
+        newstr[len]= '\0';
+    }
+    return newstr;
+}
+#endif
+
 static size_t dtostr(char *buf, size_t bufsize, double realval)
 {
     size_t len = 0;