diff --git a/test/v3ext.c b/test/v3ext.c
index 7a240cd706..6cec6f1a9b 100644
--- a/test/v3ext.c
+++ b/test/v3ext.c
@@ -15,6 +15,7 @@
 #include <openssl/err.h>
 #include "internal/nelem.h"
 
+#include <string.h>
 #include "testutil.h"
 
 static const char *infile;
