]> git.ipfire.org Git - thirdparty/git.git/commitdiff
build: include procinfo.c impl for macOS
authorMatthew John Cheetham <mjcheetham@outlook.com>
Fri, 13 Feb 2026 19:54:56 +0000 (19:54 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Feb 2026 20:18:31 +0000 (12:18 -0800)
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>
config.mak.uname
contrib/buildsystems/CMakeLists.txt
meson.build

index 1691c6ae6e01e355123e82be072b515429109dd3..baa5018461c3dba19dd4847e6d7e435382cdf276 100644 (file)
@@ -148,6 +148,8 @@ ifeq ($(uname_S),Darwin)
        HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
        CSPRNG_METHOD = arc4random
        USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS = YesPlease
+       HAVE_PLATFORM_PROCINFO = YesPlease
+       COMPAT_OBJS += compat/darwin/procinfo.o
 
        # Workaround for `gettext` being keg-only and not even being linked via
        # `brew link --force gettext`, should be obsolete as of
index edb0fc04ad76494d8f2ab76f8b5359e54742c90c..d489f0cadab4dea2c4bf39655593c610e44c7ede 100644 (file)
@@ -274,6 +274,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
 elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
        add_compile_definitions(PROCFS_EXECUTABLE_PATH="/proc/self/exe" HAVE_DEV_TTY )
        list(APPEND compat_SOURCES unix-socket.c unix-stream-server.c compat/linux/procinfo.c)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+       list(APPEND compat_SOURCES compat/darwin/procinfo.c)
 endif()
 
 if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
index 1f95a06edb78297bee870b181e2878320c153dd4..32d470e4f73739f66b7e6d17a2d01b0ae1d651cc 100644 (file)
@@ -1292,6 +1292,8 @@ if host_machine.system() == 'linux'
   libgit_sources += 'compat/linux/procinfo.c'
 elif host_machine.system() == 'windows'
   libgit_sources += 'compat/win32/trace2_win32_process_info.c'
+elif host_machine.system() == 'darwin'
+  libgit_sources += 'compat/darwin/procinfo.c'
 else
   libgit_sources += 'compat/stub/procinfo.c'
 endif