Skip to content

Commit 863d158

Browse files
mjcheethamgitster
authored andcommitted
build: include procinfo.c impl for macOS
Include an implementation of trace2_collect_process_info for macOS. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent b47c32c commit 863d158

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

config.mak.uname

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ ifeq ($(uname_S),Darwin)
148148
HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
149149
CSPRNG_METHOD = arc4random
150150
USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS = YesPlease
151+
HAVE_PLATFORM_PROCINFO = YesPlease
152+
COMPAT_OBJS += compat/darwin/procinfo.o
151153

152154
# Workaround for `gettext` being keg-only and not even being linked via
153155
# `brew link --force gettext`, should be obsolete as of

contrib/buildsystems/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
274274
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
275275
add_compile_definitions(PROCFS_EXECUTABLE_PATH="/proc/self/exe" HAVE_DEV_TTY )
276276
list(APPEND compat_SOURCES unix-socket.c unix-stream-server.c compat/linux/procinfo.c)
277+
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
278+
list(APPEND compat_SOURCES compat/darwin/procinfo.c)
277279
endif()
278280

279281
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")

meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,8 @@ if host_machine.system() == 'linux'
12921292
libgit_sources += 'compat/linux/procinfo.c'
12931293
elif host_machine.system() == 'windows'
12941294
libgit_sources += 'compat/win32/trace2_win32_process_info.c'
1295+
elif host_machine.system() == 'darwin'
1296+
libgit_sources += 'compat/darwin/procinfo.c'
12951297
else
12961298
libgit_sources += 'compat/stub/procinfo.c'
12971299
endif

0 commit comments

Comments
 (0)