Fix includes for command-line utilities

Most importantly, import `io.h` under Windows as it is required for using
`_open_osfhandle`.
This commit is contained in:
Martchus 2023-01-26 22:26:42 +01:00
parent b6fa13f8dd
commit d1eeae83c6
1 changed files with 6 additions and 5 deletions

View File

@ -6,13 +6,14 @@
#include <iostream>
#include <string>
#ifndef PLATFORM_WINDOWS
#include <sys/ioctl.h>
#include <unistd.h>
#else
#include <cstring>
#include <fcntl.h>
#ifdef PLATFORM_WINDOWS
#include <cstring>
#include <io.h>
#include <windows.h>
#else
#include <unistd.h>
#include <sys/ioctl.h>
#endif
using namespace std;