Joshua-Ashton / d9vk

A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]
https://github.com/doitsujin/dxvk
zlib License
833 stars 42 forks source link

Winelib build fails to compile due to timeval redefinition (workaround included) #461

Closed aqxa1 closed 4 years ago

aqxa1 commented 4 years ago

Software information

Winelib build fails to compile with current D9VK git. With the following errors:

In file included from /usr/include/wine-staging-4.20/wine/windows/windows.h:64, from ../src/dxvk/../util/util_time.h:8, from ../src/dxvk/hud/dxvk_hud_stats.h:3, from ../src/dxvk/hud/dxvk_hud_stats.cpp:1: /usr/include/wine-staging-4.20/wine/windows/winsock.h:445:16: error: redefinition of ‘struct timeval’ 445 | typedef struct WS(timeval)

System information

Workaround patch

https://github.com/aqxa1/d9vk/commit/b19562cea19799699d06201ba012aca2a8345d65

I'm not sure if there are any side effects to this (I wouldn't think D9VK would use winsock). I also tried setting_TIMEVAL_DEFINED, but Wine's winsock.h undefines it before setting it's own value (which causes the problem).

Joshua-Ashton commented 4 years ago

There is a fix for this upstream already, just need to rebase.

aqxa1 commented 4 years ago

Yeah, just noticed myself.