build: remove SYSAPI_UNIX define

This commit is contained in:
sithlord48
2026-02-27 22:40:15 -05:00
committed by Chris Rizzitello
parent 90e79dad75
commit fce1a37e97
6 changed files with 6 additions and 9 deletions

View File

@ -163,9 +163,6 @@ macro(configure_unix_libs)
message(WARNING "pkg-config not found, skipping wayland libraries")
endif()
endif()
add_definitions(-DSYSAPI_UNIX=1)
endmacro()
#

View File

@ -157,7 +157,7 @@ int DaemonApp::daemonLoop()
#if SYSAPI_WIN32
// Runs the daemon through the Windows service controller, which controls the program lifecycle.
return ArchDaemonWindows::runDaemon([this]() { return mainLoop(); });
#elif SYSAPI_UNIX
#else
return mainLoop();
#endif
}

View File

@ -32,7 +32,7 @@
#include "arch/win32/ArchMultithreadWindows.h"
#include "arch/win32/ArchNetworkWinsock.h"
#elif SYSAPI_UNIX
#else
#include "arch/ArchDaemonNone.h"
#include "arch/unix/ArchLogUnix.h"

View File

@ -15,7 +15,7 @@
#if SYSAPI_WIN32
#include "deskflow/win32/AppUtilWindows.h"
#elif SYSAPI_UNIX
#else
#include "deskflow/unix/AppUtilUnix.h"
#endif

View File

@ -660,7 +660,7 @@ ISocketMultiplexerJob *SecureSocket::serviceConnect(ISocketMultiplexerJob *const
int status = 0;
#ifdef SYSAPI_WIN32
status = secureConnect(static_cast<int>(getSocket()->m_socket));
#elif SYSAPI_UNIX
#else
status = secureConnect(getSocket()->m_fd);
#endif
@ -688,7 +688,7 @@ ISocketMultiplexerJob *SecureSocket::serviceAccept(ISocketMultiplexerJob *const,
int status = 0;
#ifdef SYSAPI_WIN32
status = secureAccept(static_cast<int>(getSocket()->m_socket));
#elif SYSAPI_UNIX
#else
status = secureAccept(getSocket()->m_fd);
#endif
// If status < 0, error happened

View File

@ -54,7 +54,7 @@ void TCPListenSocket::bind(const NetworkAddress &addr)
try {
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
// 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.