1. The #if ... defined(__ cplusplus) is necessary for the successful compilation of C++ llvmjit code that uses C headers.
2. #if defined(HAVE_GSS_API_H) && !defined(GSS_DLLIMP) is necessary for the successful link libgss.a provided by MSYS2.
3. Remember that you need to run autoreconf before running configure.
4. Found and fixed a small bug in the patch. Build in environment CentOS 7.7.1908 works. Build in environment MSYS2 gcc 9.2.0 works. Build in environment Visual Studio Community 2019 works.