build: remove SYSAPI_UNIX define
This commit is contained in:
parent
90e79dad75
commit
fce1a37e97
6 changed files with 6 additions and 9 deletions
|
|
@ -163,9 +163,6 @@ macro(configure_unix_libs)
|
||||||
message(WARNING "pkg-config not found, skipping wayland libraries")
|
message(WARNING "pkg-config not found, skipping wayland libraries")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DSYSAPI_UNIX=1)
|
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ int DaemonApp::daemonLoop()
|
||||||
#if SYSAPI_WIN32
|
#if SYSAPI_WIN32
|
||||||
// Runs the daemon through the Windows service controller, which controls the program lifecycle.
|
// Runs the daemon through the Windows service controller, which controls the program lifecycle.
|
||||||
return ArchDaemonWindows::runDaemon([this]() { return mainLoop(); });
|
return ArchDaemonWindows::runDaemon([this]() { return mainLoop(); });
|
||||||
#elif SYSAPI_UNIX
|
#else
|
||||||
return mainLoop();
|
return mainLoop();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
#include "arch/win32/ArchMultithreadWindows.h"
|
#include "arch/win32/ArchMultithreadWindows.h"
|
||||||
#include "arch/win32/ArchNetworkWinsock.h"
|
#include "arch/win32/ArchNetworkWinsock.h"
|
||||||
|
|
||||||
#elif SYSAPI_UNIX
|
#else
|
||||||
|
|
||||||
#include "arch/ArchDaemonNone.h"
|
#include "arch/ArchDaemonNone.h"
|
||||||
#include "arch/unix/ArchLogUnix.h"
|
#include "arch/unix/ArchLogUnix.h"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#if SYSAPI_WIN32
|
#if SYSAPI_WIN32
|
||||||
#include "deskflow/win32/AppUtilWindows.h"
|
#include "deskflow/win32/AppUtilWindows.h"
|
||||||
#elif SYSAPI_UNIX
|
#else
|
||||||
#include "deskflow/unix/AppUtilUnix.h"
|
#include "deskflow/unix/AppUtilUnix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,7 @@ ISocketMultiplexerJob *SecureSocket::serviceConnect(ISocketMultiplexerJob *const
|
||||||
int status = 0;
|
int status = 0;
|
||||||
#ifdef SYSAPI_WIN32
|
#ifdef SYSAPI_WIN32
|
||||||
status = secureConnect(static_cast<int>(getSocket()->m_socket));
|
status = secureConnect(static_cast<int>(getSocket()->m_socket));
|
||||||
#elif SYSAPI_UNIX
|
#else
|
||||||
status = secureConnect(getSocket()->m_fd);
|
status = secureConnect(getSocket()->m_fd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -688,7 +688,7 @@ ISocketMultiplexerJob *SecureSocket::serviceAccept(ISocketMultiplexerJob *const,
|
||||||
int status = 0;
|
int status = 0;
|
||||||
#ifdef SYSAPI_WIN32
|
#ifdef SYSAPI_WIN32
|
||||||
status = secureAccept(static_cast<int>(getSocket()->m_socket));
|
status = secureAccept(static_cast<int>(getSocket()->m_socket));
|
||||||
#elif SYSAPI_UNIX
|
#else
|
||||||
status = secureAccept(getSocket()->m_fd);
|
status = secureAccept(getSocket()->m_fd);
|
||||||
#endif
|
#endif
|
||||||
// If status < 0, error happened
|
// If status < 0, error happened
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ void TCPListenSocket::bind(const NetworkAddress &addr)
|
||||||
try {
|
try {
|
||||||
std::scoped_lock lock{m_mutex};
|
std::scoped_lock lock{m_mutex};
|
||||||
|
|
||||||
#if SYSAPI_UNIX
|
#if defined(Q_OS_UNIX)
|
||||||
// Only reuse socket addr on Unix so we can restart the server quickly (Unix holds the port
|
// Only reuse socket addr on Unix so we can restart the server quickly (Unix holds the port
|
||||||
// in TIME_WAIT for a few mins after close). This is not needed on Windows and can cause issues
|
// in TIME_WAIT for a few mins after close). This is not needed on Windows and can cause issues
|
||||||
// because binding to a re-use port makes it look like the server is listening when it is not.
|
// because binding to a re-use port makes it look like the server is listening when it is not.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue