diff --git a/libavutil/internal.h b/libavutil/internal.h
index bd2ce5cf6c208863bfe2f2b73800a997f0eef152..63d14a55e3486facb84b13c929e8c31b2b3ecd57 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -34,6 +34,7 @@
 #include <stdint.h>
 #include <stddef.h>
 #include <assert.h>
+#include "config.h"
 #include "common.h"
 #include "timer.h"
 
@@ -97,8 +98,6 @@
 #    define PIC
 #endif
 
-#include "config.h"
-
 #ifndef offsetof
 #    define offsetof(T,F) ((unsigned int)((char *)&((T *)0)->F))
 #endif