update compilation includes for haiku

This commit is contained in:
Al Hoang 2021-10-31 21:22:56 -05:00
parent b26b72f540
commit 406baf4b12
2 changed files with 10 additions and 1 deletions

View File

@ -3836,6 +3836,15 @@ fn detectLibCFromLibCInstallation(arena: *Allocator, target: Target, lci: *const
list.appendAssumeCapacity(shared_dir);
}
}
if (target.os.tag == .haiku) {
const include_dir_path = lci.include_dir orelse return error.LibCInstallationNotAvailable;
const os_dir = try std.fs.path.join(arena, &[_][]const u8{ include_dir_path, "os" });
list.appendAssumeCapacity(os_dir);
const config_dir = try std.fs.path.join(arena, &[_][]const u8{ include_dir_path, "config" });
list.appendAssumeCapacity(config_dir);
}
return LibCDirs{
.libc_include_dir_list = list.items,
.libc_installation = lci,

View File

@ -321,7 +321,7 @@ pub const LibCInstallation = struct {
const sys_include_dir_example_file = if (is_windows)
"sys\\types.h"
else if (is_haiku)
"posix/errno.h"
"errno.h"
else
"sys/errno.h";