diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 2c172e7889a04d3c6da43b7da1914ac68f6fa043..fe14b129a66799e6ab499e0c4b3174c4caaf2115 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -21,6 +21,8 @@
 #ifndef FFMPEG_SWSCALE_INTERNAL_H
 #define FFMPEG_SWSCALE_INTERNAL_H
 
+#include "config.h"
+
 #ifdef HAVE_ALTIVEC_H
 #include <altivec.h>
 #endif