Skip to content

Commit 59bf746

Browse files
committed
fsm-listen-darwin: stub in backend for Darwin
Stub in empty implementation of fsmonitor--daemon backend for Darwin (aka MacOS). Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 91b26cc commit 59bf746

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

compat/fsmonitor/fsm-listen-darwin.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "cache.h"
2+
#include "fsmonitor.h"
3+
#include "fsm-listen.h"
4+
5+
int fsm_listen__ctor(struct fsmonitor_daemon_state *state)
6+
{
7+
return -1;
8+
}
9+
10+
void fsm_listen__dtor(struct fsmonitor_daemon_state *state)
11+
{
12+
}
13+
14+
void fsm_listen__stop_async(struct fsmonitor_daemon_state *state)
15+
{
16+
}
17+
18+
void fsm_listen__loop(struct fsmonitor_daemon_state *state)
19+
{
20+
}

config.mak.uname

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ ifeq ($(uname_S),Darwin)
147147
MSGFMT = /usr/local/opt/gettext/bin/msgfmt
148148
endif
149149
endif
150+
FSMONITOR_DAEMON_BACKEND = darwin
151+
BASIC_LDFLAGS += -framework CoreServices
150152
endif
151153
ifeq ($(uname_S),SunOS)
152154
NEEDS_SOCKET = YesPlease

contrib/buildsystems/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ endif()
266266
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
267267
add_compile_definitions(HAVE_FSMONITOR_DAEMON_BACKEND)
268268
list(APPEND compat_SOURCES compat/fsmonitor/fsm-listen-win32.c)
269+
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
270+
add_compile_definitions(HAVE_FSMONITOR_DAEMON_BACKEND)
271+
list(APPEND compat_SOURCES compat/fsmonitor/fsm-listen-darwin.c)
269272
endif()
270273

271274
set(EXE_EXTENSION ${CMAKE_EXECUTABLE_SUFFIX})

0 commit comments

Comments
 (0)