LibCore: Use the Linux implementation of TimeZoneWatcher on BSDs

The same implementation works just fine on any BSD system provided it
has a working FileWatcher implementation.
This commit is contained in:
Undefine 2025-12-30 00:08:44 +01:00 committed by Andrew Kaster
parent 941797c807
commit 822d8463c2
2 changed files with 12 additions and 20 deletions

View file

@ -92,25 +92,21 @@ endif()
# FIXME: Implement ProcessStatistics for Windows and *BSD
if (LINUX)
list(APPEND SOURCES
Platform/ProcessStatisticsLinux.cpp
TimeZoneWatcherLinux.cpp
)
list(APPEND SOURCES Platform/ProcessStatisticsLinux.cpp)
elseif (APPLE AND NOT IOS)
list(APPEND SOURCES
Platform/ProcessStatisticsMach.cpp
TimeZoneWatcherMacOS.mm
)
list(APPEND SOURCES Platform/ProcessStatisticsMach.cpp)
else ()
list(APPEND SOURCES Platform/ProcessStatisticsUnimplemented.cpp)
endif()
if (LINUX OR BSD)
list(APPEND SOURCES TimeZoneWatcherUnix.cpp)
elseif (APPLE AND NOT IOS)
list(APPEND SOURCES TimeZoneWatcherMacOS.mm)
elseif (WIN32)
list(APPEND SOURCES
Platform/ProcessStatisticsUnimplemented.cpp
TimeZoneWatcherWindows.cpp
)
list(APPEND SOURCES TimeZoneWatcherWindows.cpp)
else()
list(APPEND SOURCES
Platform/ProcessStatisticsUnimplemented.cpp
TimeZoneWatcherUnimplemented.cpp
)
list(APPEND SOURCES TimeZoneWatcherUnimplemented.cpp)
endif()
if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "GNU")

View file

@ -8,10 +8,6 @@
#include <LibCore/FileWatcher.h>
#include <LibCore/TimeZoneWatcher.h>
#if !defined(AK_OS_LINUX)
static_assert(false, "This file must only be used for Linux");
#endif
namespace Core {
static constexpr auto time_zone_files = Array {