Skip to content

Commit 871491f

Browse files
pks-tgitster
authored andcommitted
meson: fix compat sources when compiling with MSVC
In our compat library we have both "msvc.c" and "mingw.c". The former is mostly a thin wrapper around the latter as it directly includes it, but it has a couple of extra headers that aren't included in "mingw.c" and is expected to be used with the Visual Studio compiler toolchain. While our Makefile knows to pick up the correct file depending on whether or not the Visual Studio toolchain is used, we don't do the same with Meson. Fix this. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4b68faf commit 871491f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,6 @@ if host_machine.system() == 'cygwin'
11071107
]
11081108
elif host_machine.system() == 'windows'
11091109
libgit_sources += [
1110-
'compat/mingw.c',
11111110
'compat/winansi.c',
11121111
'compat/win32/dirent.c',
11131112
'compat/win32/flush.c',
@@ -1134,6 +1133,9 @@ elif host_machine.system() == 'windows'
11341133
libgit_include_directories += 'compat/win32'
11351134
if compiler.get_id() == 'msvc'
11361135
libgit_include_directories += 'compat/vcbuild/include'
1136+
libgit_sources += 'compat/msvc.c'
1137+
else
1138+
libgit_sources += 'compat/mingw.c'
11371139
endif
11381140
endif
11391141

0 commit comments

Comments
 (0)