Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

Fix Linux build: guard cbm_macos_adhoc_sign with #ifdef __APPLE__

Martin Vogelb7e076c5d59a
diff --git a/src/cli/cli.c b/src/cli/cli.c
index 6ff95c9a8..1c59983f7 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -2252,8 +2252,8 @@ static int cbm_download_to_file_quiet(const char *url, const char *dest) {
/* ── macOS ad-hoc signing ─────────────────────────────────────── */
-static int cbm_macos_adhoc_sign(const char *binary_path) {
#ifdef __APPLE__
+static int cbm_macos_adhoc_sign(const char *binary_path) {
/* Remove quarantine xattr (best effort — may not exist) */
const char *xattr_argv[] = {"xattr", "-d", "com.apple.quarantine", binary_path, NULL};
(void)cbm_exec_no_shell(xattr_argv);
@@ -2261,11 +2261,8 @@ static int cbm_macos_adhoc_sign(const char *binary_path) {
/* Ad-hoc sign (required for arm64, harmless for x86_64) */
const char *sign_argv[] = {"codesign", "--sign", "-", "--force", binary_path, NULL};
return cbm_exec_no_shell(sign_argv);
-#else
- (void)binary_path;
- return 0;
-#endif
}
+#endif
/* ── Kill other MCP server instances ──────────────────────────── */