include: Use WIN32_LEAN_AND_MEAN to exlude non-required headers
Reference https://bugs.winehq.org/show_bug.cgi?id=54985
From the line we see the mingw version used causes an In file included from /usr/share/mingw-w64/include/unknwnbase.h:47, [ 935s] from /usr/share/mingw-w64/include/objidlbase.h:439, [ 935s] from include/combaseapi.h:29, [ 935s] from include/objbase.h:267, [ 935s] from include/ole2.h:25, [ 935s] from /usr/share/mingw-w64/include/wtypes.h:13, [ 935s] from include/winscard.h:22, [ 935s] from include/windows.h:68, [ 935s] from libs/vkd3d/include/private/vkd3d_common.h:23, [ 935s] from libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h:49, [ 935s] from libs/vkd3d/libs/vkd3d-shader/preproc.y:24, [ 935s] from libs/vkd3d/libs/vkd3d-shader/preproc.l:23: [ 935s] /usr/share/mingw-w64/include/wtypesbase.h:148:16: error: redefinition of 'struct _SECURITY_ATTRIBUTES' [ 935s] 148 | typedef struct _SECURITY_ATTRIBUTES {
The included file winscard.h seemed a little odd. The vkd3d isn't going to use this. Adding the define WIN32_LEAN_AND_MEAN to the Makefile.in (in wine), produce the following warnings.
/home/alesliehughes/wine/libs/vkd3d/include/private/vkd3d_common.h:75:5: warning: implicit declaration of function ‘abort’ [-Wimplicit-function-declaration] 75 | abort(); | ^~~~~ /home/alesliehughes/wine/libs/vkd3d/include/private/vkd3d_common.h:258:14: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration] 258 | *major = atoi(version);
Adding header <stdlib.h> removed all the warnings.