Fix Windows compile error.

This commit is contained in:
Jonathan Naylor 2018-07-26 18:43:57 +01:00
parent e97006d7c9
commit f4718ebb9c

View file

@ -208,9 +208,6 @@ int CMMDVMHost::run()
return -1; return -1;
} }
::close(STDIN_FILENO);
::close(STDOUT_FILENO);
#if !defined(HD44780) && !defined(OLED) && !defined(_OPENWRT) #if !defined(HD44780) && !defined(OLED) && !defined(_OPENWRT)
// If we are currently root... // If we are currently root...
if (getuid() == 0) { if (getuid() == 0) {
@ -253,8 +250,13 @@ int CMMDVMHost::run()
return 1; return 1;
} }
if (m_daemon) #if !defined(_WIN32) && !defined(_WIN64)
if (m_daemon) {
::close(STDIN_FILENO);
::close(STDOUT_FILENO);
::close(STDERR_FILENO); ::close(STDERR_FILENO);
}
#endif
LogInfo(HEADER1); LogInfo(HEADER1);
LogInfo(HEADER2); LogInfo(HEADER2);