marbl / meryl

A genomic k-mer counter (and sequence utility) with nice features.
119 stars 14 forks source link

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

Open shawarden opened 1 year ago

shawarden commented 1 year ago

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.

brianwalenz commented 1 year ago

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