Skip to content

Commit f2197fa

Browse files
authored
Merge pull request #1141 from zevv/mingw-test
Add CI test for mingw/wine on linux
2 parents 148917d + a6a097c commit f2197fa

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/test.yml

+17
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,20 @@ jobs:
5757
- name: Build the project
5858
shell: cmd
5959
run: make -j CC=gcc
60+
61+
test-mingw-linux:
62+
name: Build and test with Mingw on Linux + Wine
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Checkout the repository
66+
uses: actions/checkout@master
67+
- name: Setup Mingw and wine
68+
run: |
69+
sudo dpkg --add-architecture i386
70+
sudo apt-get update
71+
sudo apt-get install libstdc++6:i386 libgcc-s1:i386
72+
sudo apt-get install gcc-mingw-w64-x86-64-win32 wine wine32 wine64
73+
- name: Compile the project
74+
run: make clean && make CC=x86_64-w64-mingw32-gcc LD=x86_64-w64-mingw32-gcc UNAME=MINGW RUN=wine
75+
- name: Test the project
76+
run: make test UNAME=MINGW RUN=wine

src/core/features.h

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
#define WIN32_LEAN_AND_MEAN
5151
#endif
5252

53+
/* needed for inet_pton and InitializeSRWLock */
54+
#ifdef __MINGW32__
55+
#define _WIN32_WINNT _WIN32_WINNT_VISTA
56+
#endif
57+
5358
/* Needed for realpath on linux, as well as pthread rwlocks. */
5459
#ifndef _XOPEN_SOURCE
5560
#define _XOPEN_SOURCE 600

0 commit comments

Comments
 (0)