diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index e460b5be7f..8751ce5576 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -32,7 +32,6 @@
 #include "bprint.h"
 #include "error.h"
 #include "macros.h"
-#include "version.h"
 
 int av_strstart(const char *str, const char *pfx, const char **ptr)
 {
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index 9b187e8d92..fc095349d2 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -24,7 +24,6 @@
 #include <stddef.h>
 #include <stdint.h>
 #include "attributes.h"
-#include "version.h"
 
 /**
  * @addtogroup lavu_string
diff --git a/libavutil/spherical.c b/libavutil/spherical.c
index ed66344a2f..800d3459a5 100644
--- a/libavutil/spherical.c
+++ b/libavutil/spherical.c
@@ -19,6 +19,7 @@
  */
 
 #include "avstring.h"
+#include "macros.h"
 #include "mem.h"
 #include "spherical.h"