Skip to content

Commit

Permalink
Add '#include <io.h>'
Browse files Browse the repository at this point in the history
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>`.
  • Loading branch information
gvanem authored Dec 1, 2023
1 parent f5dd48a commit e1f0a2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions host/hackrf-tools/src/hackrf_sweep.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ typedef int bool;
#ifdef _WIN32
#define _USE_MATH_DEFINES
#include <windows.h>
#include <io.h>
#ifdef _MSC_VER

#ifdef _WIN64
Expand Down

0 comments on commit e1f0a2c

Please sign in to comment.