Skip to content

Commit 3bd750b

Browse files
committed
Host (Linux): detect Linux Binary Compatibility on FreeBSD
Fix #1786
1 parent 4a1ada6 commit 3bd750b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/detection/host/host_linux.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ const char* ffDetectHost(FFHostResult* host)
9393
}); // supported in 2.2.3 and later
9494
}
9595
}
96+
else if (ffStrbufStartsWithS(&instance.state.platform.sysinfo.version, "FreeBSD "))
97+
{
98+
ffStrbufSetStatic(&host->name, "Linux Binary Compatibility on FreeBSD");
99+
ffStrbufSetStatic(&host->family, "FreeBSD");
100+
ffStrbufSetStatic(&host->vendor, "FreeBSD Foundation");
101+
if (instance.config.general.detectVersion)
102+
{
103+
ffStrbufSetS(&host->version, instance.state.platform.sysinfo.version.chars + strlen("FreeBSD "));
104+
ffStrbufSubstrBeforeFirstC(&host->version, ' ');
105+
}
106+
}
96107
}
97108

98109
return NULL;

0 commit comments

Comments
 (0)