I solved this problem using GIT to fix instead of using patch.exe (Patch for windows). I use the following command, changing the directory to the patch file, and it worked fine.
git apply mypatch.patch
To ignore spaces, you can also use the following command -
git apply --ignore-space-change --ignore-whitepsace --whilespace=nowarn mypatch.patch
source
share