diff --git a/stream/cookies.c b/stream/cookies.c
index 3a828f8d5e..ea46c42419 100644
--- a/stream/cookies.c
+++ b/stream/cookies.c
@@ -13,6 +13,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <inttypes.h>
+#include <limits.h>
 
 #include "cookies.h"
 #include "http.h"