greatscottgadgets / hackrf

low cost software radio platform
https://greatscottgadgets.com/hackrf/
GNU General Public License v2.0
6.49k stars 1.52k forks source link

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

Closed gvanem closed 10 months ago

gvanem commented 10 months ago

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>.

gvanem commented 10 months ago

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

martinling commented 10 months ago

Thanks for the fix!