diff --git a/lib/strtok.h b/lib/strtok.h
index d7ecdf1d37ea9c3228bdc708cced75c8c4798b04..1c72d8c031b4935d04f77f0f52aa6935003ce375 100644
--- a/lib/strtok.h
+++ b/lib/strtok.h
@@ -31,7 +31,14 @@
 char *Curl_strtok_r(char *s, const char *delim, char **last);
 #define strtok_r Curl_strtok_r
 #else
-extern char *strtok_r(char *s1, const char *s2, char **lasts);
+#include <string.h>
+/* If your system, such as Solaris 2.7, lacks the strtok_r() prototype in
+   string.h, then you'll face a bunch of warnings on all instances
+   where strtok_r() is used.
+
+   There's not much we can do about it. Adding a prototype here screws
+   everything up on other platforms! :-(
+*/
 #endif
 
 #endif