diff --git a/tests/data/test1608 b/tests/data/test1608
index fbc6238958..d037508b84 100644
--- a/tests/data/test1608
+++ b/tests/data/test1608
@@ -14,6 +14,7 @@ none
unittest
+shuffle-dns
verify DNS shuffling
diff --git a/tests/unit/unit1608.c b/tests/unit/unit1608.c
index 31c6912695..f734b77885 100644
--- a/tests/unit/unit1608.c
+++ b/tests/unit/unit1608.c
@@ -25,6 +25,8 @@
#include "hostip.h"
+#ifndef CURL_DISABLE_SHUFFLE_DNS
+
CURLcode Curl_shuffle_addr(struct Curl_easy *data,
struct Curl_addrinfo **addr);
@@ -72,3 +74,16 @@ UNITTEST_START
abort_unless(addrhead != addrs, "addresses are not being reordered");
UNITTEST_STOP
+
+#else
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+static void unit_stop(void)
+{
+}
+UNITTEST_START
+UNITTEST_STOP
+
+#endif