Fix platform-specific bugs for FreeBSD compilation

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2025-10-18 00:05:53 +02:00
parent 8df9603188
commit ed88458efd
2 changed files with 16 additions and 6 deletions

View File

@@ -20,7 +20,10 @@ const pwd = @cImport({
@cInclude("pwd.h");
// We include a FreeBSD-specific header here since login_cap.h references
// the passwd struct directly, so we can't import it separately
if (builtin.os.tag == .freebsd) @cInclude("login_cap.h");
if (builtin.os.tag == .freebsd) {
@cInclude("sys/types.h");
@cInclude("login_cap.h");
}
});
const stdlib = @cImport({