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
MB-41209: Use specific 'Winsock2.h' header for timeval (re-apply)
(Re-apply after previous revert due to missing some uses of Windows.h)
When compiling under MSVC with 'WIN32_LEAN_AND_MEAN' defined (to avoid
symbol collisions with glog / reduce number of unnecessary headers
included), forestdb fails to compile with the following error:
..\forestdb\utils\gettimeofday_vs.cc(25): error C2027: use of undefined type 'timeval'
forestdb\utils\gettimeofday_vs.h(17): note: see declaration of 'timeval'
The issue is that gettimeofday_vs.h & time_utils.h includes Windows.h,
which will only include the necessary header for 'timeval'
(Winsock2.h) if WIN32_LEAN_AND_MEAN is not defined.
Fix this by simply including the necessary Winsock2.h header directly.
Change-Id: Icac0b7e476ff2a9fad2f4f9d4d998a06c29c49f4
Reviewed-on: http://review.couchbase.org/c/forestdb/+/135618
Tested-by: Build Bot <[email protected]>
Reviewed-by: Trond Norbye <[email protected]>
0 commit comments