Fixed issues with Win64 build failing to build ffmpeg #12781
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
buildmpeg.sh was changed to match the value assigned to ARCH in other scripts/batch files (x86_64). It looks like it was just typoed initially.
The ffmpeg patch fixes an issue where the zlib includes (zconf.h:477) were trying to
#include <unistd.h>
when compiled with Visual Studio. I tracked this down to the ffmpeg configure script creating#define HAVE_UNISTD_H 0
in config.h. This works fine for ffmpeg, since all its checks use#if HAVE_UNISTD_H
, but does not work on zlib which uses#ifdef HAVE_UNISTD_H
(zconf.h:436). The patch simply#undef HAVE_UNISTD_H
ifHAVE_UNISTD_H
is set to0
. This will causeHAVE_UNISTD_H
checks to work with both zlib and ffmpeg.Motivation and Context
I wanted to check out the latest Kodi Alpha, and my build environment is Win64 using Visual Studio 2015. I followed the build instructions, but ended up running into errors. I tracked down the source of the different errors and came up with my best attempt at fixing them that worked with the existing build system.
How Has This Been Tested?
I ran the build from a clean state (git clean -xdf) with only my additional commit and was able to build, run tests, and use Kodi.
Screenshots (if appropriate):
Types of change
Checklist: