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

Add '#include <io.h>' #1383

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Add '#include <io.h>' #1383

merged 1 commit into from
Dec 4, 2023

Conversation

gvanem
Copy link
Contributor

@gvanem gvanem commented Dec 1, 2023

Compiling with clang-cl, gives this error:

hackrf-tools/src/hackrf_sweep.c(685,3): error: call to undeclared function '_setmode'; ISO C99 and later do not support implicit function
      declarations [-Wimplicit-function-declaration]
  685 |                 _setmode(_fileno(stdout), _O_BINARY);
      |                 ^

fixed by simply adding #include <io.h>.

Compiling with clang-cl, gives this error:
```c
hackrf-tools/src/hackrf_sweep.c(685,3): error: call to undeclared function '_setmode'; ISO C99 and later do not support implicit function
      declarations [-Wimplicit-function-declaration]
  685 |                 _setmode(_fileno(stdout), _O_BINARY);
      |                 ^
```

fixed by simply adding `#include <io.h>`.
@gvanem
Copy link
Contributor Author

gvanem commented Dec 1, 2023

PS: compiling with cl simply gives this warning warning C4013: '_setmode' undefined; assuming extern returning int

@martinling
Copy link
Member

Thanks for the fix!

@martinling martinling merged commit d867f7f into greatscottgadgets:master Dec 4, 2023
16 of 17 checks passed
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.

2 participants