miniball
miniball copied to clipboard
Build error on MSVC due to POSIX headers (sys/resource.h, sys/time.h) include in Seb_debug.h
When compiling a project which includes "Seb.h" using MSVC, compilation will fail due to the missing POSIX headers:
cpp\main/Seb_debug.h(12,10): fatal error : 'sys/resource.h' file not found
I was able to work around this in a fork of the repo by forward declaring the used timeval
struct.
A cleaner way would probably to either git rid of the POSIX header dependency and rely solely on functionality from the C++ standard library (e.g. std::chrono
) or at least prevent the compiler from hitting the mentioned include when SEB_DEBUG_MODE
is not defined.
@TheGrumpyCoda Thanks a lot for reporting this. If you have time to submit a PR, feel free to do so—very happy to take your fix/improvement in, pc course!