From 7b8c024f511a7240da3d83017019b284802c90d7 Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Wed, 4 Aug 2021 10:20:55 -0400 Subject: [PATCH] fsmonitor-settings: stub in platform-specific incompatibility checking on MacOS Signed-off-by: Jeff Hostetler --- compat/fsmonitor/fsm-settings-darwin.c | 9 +++++++++ config.mak.uname | 1 + contrib/buildsystems/CMakeLists.txt | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 compat/fsmonitor/fsm-settings-darwin.c diff --git a/compat/fsmonitor/fsm-settings-darwin.c b/compat/fsmonitor/fsm-settings-darwin.c new file mode 100644 index 0000000000..176a6f5726 --- /dev/null +++ b/compat/fsmonitor/fsm-settings-darwin.c @@ -0,0 +1,9 @@ +#include "cache.h" +#include "config.h" +#include "repository.h" +#include "fsmonitor-settings.h" + +enum fsmonitor_reason fsm_os__incompatible(struct repository *r) +{ + return FSMONITOR_REASON_ZERO; +} diff --git a/config.mak.uname b/config.mak.uname index 8a7b5dfe9f..8c8dd83b37 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -148,6 +148,7 @@ ifeq ($(uname_S),Darwin) endif endif FSMONITOR_DAEMON_BACKEND = darwin + FSMONITOR_OS_SETTINGS = darwin BASIC_LDFLAGS += -framework CoreServices endif ifeq ($(uname_S),SunOS) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 22d2ad5196..8ed487869a 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -296,6 +296,9 @@ endif() if(CMAKE_SYSTEM_NAME STREQUAL "Windows") add_compile_definitions(HAVE_FSMONITOR_OS_SETTINGS) list(APPEND compat_SOURCES compat/fsmonitor/fsm-settings-win32.c) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_compile_definitions(HAVE_FSMONITOR_OS_SETTINGS) + list(APPEND compat_SOURCES compat/fsmonitor/fsm-settings-darwin.c) endif() set(EXE_EXTENSION ${CMAKE_EXECUTABLE_SUFFIX})