Some minor modifications found in the attached patch file and it works: [msys2.patch](https://github.com/user-attachments/files/16413103/msys2.patch) You might consider if these changes could be applied to support MSYS2.