meryl icon indicating copy to clipboard operation
meryl copied to clipboard

[Compile] ‘gettimeofday’ was not declared in this scope

Open shawarden opened this issue 2 years ago • 1 comments

While compiling on ubuntu 22.04.2 using GCC 12.2.0 I get a bunch of the following errors:

utility/src/system/time-v1.H:88:5: error: ‘gettimeofday’ was not declared in this scope; did you mean ‘SYS_gettimeofday’?
88 |     gettimeofday(&tp, nullptr);

As per this post on stackoverflow, adding...

#define _BSD_SOURCE

#include <sys/time.h>

...to utility/src/system/time-v1.H seems to resolve this issue.

shawarden avatar Aug 01 '23 21:08 shawarden

Sorry about that. I just pushed a rewrite of that piece that should resolve the compile errors.

brianwalenz avatar Aug 02 '23 23:08 brianwalenz