You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows CMake build with clang-cl fails on main #240
common/base/windows/src/time.cpp: ws2def.h(246,16): error : redefinition of 'sockaddr' and more redefinitions. time.cpp includes <Windows.h> before <sys/time.h>. Windows.h includes the older winsock.h. Then sys/time.h includes WinSock2.h, which redefines the same types.
host/vulkan/vk_common_operations.cpp:1948: error : cannot pass object of non-trivial type 'const std::string' through variadic function; call will abort at runtime [-Wnon-pod-varargs].
The code passes getReason(), a std::string, to %s in GFXSTREAM_INFO(). This is
undefined behavior on all compilers. The code is in an _WIN32 block, so only Windows builds
compile it.
Expected result
The build completes.
Proposed fix
In time.cpp, include <sys/time.h> before <Windows.h>.
Pass getReason().c_str().
With these two changes, a clean build with default flags completes. PR: #242.
Activity