Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shawarden opened this issue Aug 1, 2023 · 1 comment
Open

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

shawarden opened this issue Aug 1, 2023 · 1 comment

Comments

@shawarden
Copy link

shawarden commented Aug 1, 2023

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants