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(win): make system_info.c and path_alias.c compile on Windows

Martin Vogeldcd9ea61d464
diff --git a/src/foundation/system_info.c b/src/foundation/system_info.c
index a9238b9e5..59af87030 100644
--- a/src/foundation/system_info.c
+++ b/src/foundation/system_info.c
@@ -101,7 +101,7 @@ static cbm_system_info_t detect_system_bsd(void) {
return info;
}
-#else /* Linux */
+#elif !defined(_WIN32) /* Linux */
static cbm_system_info_t detect_system_linux(void) {
cbm_system_info_t info;
diff --git a/src/pipeline/path_alias.c b/src/pipeline/path_alias.c
index 2d3f2d438..e3156c86e 100644
--- a/src/pipeline/path_alias.c
+++ b/src/pipeline/path_alias.c
@@ -20,6 +20,7 @@
#include "pipeline/path_alias.h"
+#include "foundation/compat.h"
#include "foundation/compat_fs.h"
#include "foundation/constants.h"
#include "foundation/log.h"
@@ -203,7 +204,7 @@ static cbm_path_alias_map_t *load_tsconfig_file(const char *abs_path, const char
const char *star = strchr(alias_pattern, '*');
if (star) {
entry->has_wildcard = true;
- entry->alias_prefix = strndup(alias_pattern, (size_t)(star - alias_pattern));
+ entry->alias_prefix = cbm_strndup(alias_pattern, (size_t)(star - alias_pattern));
entry->alias_suffix = strdup(star + 1);
} else {
entry->has_wildcard = false;
@@ -212,7 +213,7 @@ static cbm_path_alias_map_t *load_tsconfig_file(const char *abs_path, const char
}
const char *tstar = strchr(target_pattern, '*');
if (tstar) {
- char *pre = strndup(target_pattern, (size_t)(tstar - target_pattern));
+ char *pre = cbm_strndup(target_pattern, (size_t)(tstar - target_pattern));
entry->target_prefix = resolve_target_relative(dir_prefix, pre);
free(pre);
entry->target_suffix = strdup(tstar + 1);