diff --git tests/libtest/test.h tests/libtest/test.h
index 5de8c7c..8330ee3 100644
--- tests/libtest/test.h
+++ tests/libtest/test.h
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -40,6 +40,11 @@
 #  include "select.h"
 #endif
 
+#ifndef HAVE_STRDUP
+#  include "strdup.h"
+#  define strdup(ptr) curlx_strdup(ptr)
+#endif
+
 #define test_setopt(A,B,C) \
   if((res = curl_easy_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup
 
