diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6dde896c..c620c513 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,3 +57,20 @@ jobs: - name: Build the project shell: cmd run: make -j CC=gcc + + test-mingw-linux: + name: Build and test with Mingw on Linux + Wine + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@master + - name: Setup Mingw and wine + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install libstdc++6:i386 libgcc-s1:i386 + sudo apt-get install gcc-mingw-w64-x86-64-win32 wine wine32 wine64 + - name: Compile the project + run: make clean && make CC=x86_64-w64-mingw32-gcc LD=x86_64-w64-mingw32-gcc UNAME=MINGW RUN=wine + - name: Test the project + run: make test UNAME=MINGW RUN=wine diff --git a/src/core/features.h b/src/core/features.h index 46caff58..b3e1f752 100644 --- a/src/core/features.h +++ b/src/core/features.h @@ -50,6 +50,11 @@ #define WIN32_LEAN_AND_MEAN #endif +/* needed for inet_pton and InitializeSRWLock */ +#ifdef __MINGW32__ +#define _WIN32_WINNT _WIN32_WINNT_VISTA +#endif + /* Needed for realpath on linux, as well as pthread rwlocks. */ #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE 600