diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index dd5d4f5849..d5cadec695 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -37,6 +37,7 @@
 #include "libavdevice/avdevice.h"
 #include "libavdevice/version.h"
 #include "libswscale/swscale.h"
+#include "libswscale/version.h"
 #include "libswresample/swresample.h"
 #include "libswresample/version.h"
 #include "libpostproc/postprocess.h"
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 7d8ab0392e..f36397a6ff 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -55,6 +55,7 @@
 #include "libavdevice/avdevice.h"
 #include "libavdevice/version.h"
 #include "libswscale/swscale.h"
+#include "libswscale/version.h"
 #include "libswresample/swresample.h"
 #include "libswresample/version.h"
 #include "libpostproc/postprocess.h"
diff --git a/libswscale/Makefile b/libswscale/Makefile
index a0ec71e06f..1f02b56421 100644
--- a/libswscale/Makefile
+++ b/libswscale/Makefile
@@ -3,6 +3,7 @@ DESC = FFmpeg image rescaling library
 
 HEADERS = swscale.h                                                     \
           version.h                                                     \
+          version_major.h                                               \
 
 OBJS = alphablend.o                                     \
        hscale.o                                         \
diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index daa53dc01e..07c69e1ae7 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -33,7 +33,7 @@
 #include "libavutil/frame.h"
 #include "libavutil/log.h"
 #include "libavutil/pixfmt.h"
-#include "version.h"
+#include "version_major.h"
 
 /**
  * @defgroup libsws libswscale
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 34f7f0b869..e86c151f67 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -59,6 +59,7 @@
 #include "rgb2rgb.h"
 #include "swscale.h"
 #include "swscale_internal.h"
+#include "version.h"
 
 static SwsVector *sws_getIdentityVec(void);
 static void sws_addVec(SwsVector *a, SwsVector *b);
diff --git a/libswscale/version.h b/libswscale/version.h
index 0e5583aa47..c13db31c43 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -26,7 +26,8 @@
 
 #include "libavutil/version.h"
 
-#define LIBSWSCALE_VERSION_MAJOR   6
+#include "version_major.h"
+
 #define LIBSWSCALE_VERSION_MINOR   5
 #define LIBSWSCALE_VERSION_MICRO 100
 
@@ -40,10 +41,4 @@
 
 #define LIBSWSCALE_IDENT        "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
 
-/**
- * FF_API_* defines may be placed below to indicate public API that will be
- * dropped at a future version bump. The defines themselves are not part of
- * the public API and may change, break or disappear at any time.
- */
-
 #endif /* SWSCALE_VERSION_H */
diff --git a/libswscale/version_major.h b/libswscale/version_major.h
new file mode 100644
index 0000000000..2f8418780c
--- /dev/null
+++ b/libswscale/version_major.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef SWSCALE_VERSION_MAJOR_H
+#define SWSCALE_VERSION_MAJOR_H
+
+/**
+ * @file
+ * swscale version macros
+ */
+
+#define LIBSWSCALE_VERSION_MAJOR   6
+
+/**
+ * FF_API_* defines may be placed below to indicate public API that will be
+ * dropped at a future version bump. The defines themselves are not part of
+ * the public API and may change, break or disappear at any time.
+ */
+
+#endif /* SWSCALE_VERSION_MAJOR_H */
