diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index e177c676e35df3b491f908ed4a3c9b41c8eb839b..61cd235b5eb49a32632e163a2f7a36b789850650 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -75,6 +75,9 @@
 #include <netdb.h>
 #endif
 
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
 #include "curlx.h" /* from the private lib dir */
 #include "getpart.h"
 #include "inet_pton.h"
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 852b27a2edbbf4b4b0dbba90c5b3af8ce296a552..161cea678fa8aa05b41a5af9bb3d6f3e5ae081af 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -55,6 +55,9 @@
 #include <netdb.h>
 #endif
 
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
 #include "curlx.h" /* from the private lib dir */
 #include "getpart.h"
 #include "util.h"
diff --git a/tests/server/util.c b/tests/server/util.c
index 3fea37c46e889f9573d33a791044468ac2ec4b77..a3894cb44dfe165c58fa7c6a81b25f3dd3adf70e 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -48,6 +48,9 @@
 #include <netdb.h>
 #endif
 
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
 #include "curlx.h" /* from the private lib dir */
 #include "getpart.h"
 #include "util.h"