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

Include missing sys/time.h #261

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

Conversation

kraj
Copy link

@kraj kraj commented Aug 19, 2023

This is found when building for musl C library systems where sys/time.h is not included indirectly and select() and timeval structs are used

Fixes

../../git/tests/receive.c:64:17: error: variable has incomplete type 'struct timeval'
64 | struct timeval tvSelectTimeout;
| ^
../../git/tests/receive.c:64:9: note: forward declaration of 'struct timeval'
64 | struct timeval tvSelectTimeout;
| ^
../../git/tests/receive.c:67:2: error: call to undeclared function 'select'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
67 | select(0, NULL, NULL, NULL, &tvSelectTimeout);
| ^

This is found when building for musl C library systems where sys/time.h
is not included indirectly and select() and timeval structs are used

Fixes

../../git/tests/receive.c:64:17: error: variable has incomplete type 'struct timeval'
   64 |         struct timeval tvSelectTimeout;
      |                        ^
../../git/tests/receive.c:64:9: note: forward declaration of 'struct timeval'
   64 |         struct timeval tvSelectTimeout;
      |                ^
../../git/tests/receive.c:67:2: error: call to undeclared function 'select'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   67 |         select(0, NULL, NULL, NULL, &tvSelectTimeout);
      |         ^
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.

1 participant