diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c
index 8f0ebcb3bfeb00b7b0f38c3963b6a7c2026ef685..fa531a8c5a82beea92c80324580f2712143f09ad 100644
--- a/docs/examples/imap-append.c
+++ b/docs/examples/imap-append.c
@@ -20,6 +20,7 @@
  *
  ***************************************************************************/
 #include <stdio.h>
+#include <string.h>
 #include <curl/curl.h>
 
 /* This is a simple example showing how to send mail using libcurl's IMAP