diff --git a/avserver.c b/avserver.c
index 9e6289914a..6d103bb0a9 100644
--- a/avserver.c
+++ b/avserver.c
@@ -43,6 +43,8 @@
 #include "libavutil/random_seed.h"
 #include "libavutil/parseutils.h"
 #include "libavutil/opt.h"
+#include "libavutil/time.h"
+
 #include <stdarg.h>
 #include <unistd.h>
 #include <fcntl.h>