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

gettimeofday require "sys/time.h" include on macOS #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bsergean
Copy link

On Linux sys/time.h exists and contains gettimeofday, so no need to put an ifdef guard around the include.

On Linux sys/time.h exists and contains gettimeofday, so no need to put an ifdef guard around the include.
@Thomasdezeeuw
Copy link

Hit the same problem and can confirm that this fixes the problem.

@ashatch
Copy link

ashatch commented Jan 31, 2021

Also hit this problem and the fix above works on OSX 10.15.7.

@jmealo
Copy link

jmealo commented Mar 13, 2021

Hit this today.

@@ -6,6 +6,7 @@
#include "http_parser.h"
#include "stats.h"
#include "zmalloc.h"
#include "sys/time.h"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since sys/time.h is a system header, I think it would be "more correct" to use
#include <sys/time.h> in this case

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On top of @mseri comments, it should be moved to above line 5.

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

Successfully merging this pull request may close these issues.

7 participants