diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-24 18:42:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-24 18:42:30 -0800 |
| commit | 36c8adf58922d8e357bbaf7ce914cfd4b7b56354 (patch) | |
| tree | d2be6015196ab16e6029304b032df1468fb69973 /src | |
| parent | e266ede6e310b64adcf3912b8ef2b9e2397fde7b (diff) | |
| parent | be541ca5e102614c8d86b86affcda44df828d8fb (diff) | |
| download | zig-36c8adf58922d8e357bbaf7ce914cfd4b7b56354.tar.gz zig-36c8adf58922d8e357bbaf7ce914cfd4b7b56354.zip | |
Merge pull request #10073 from hoanga/haiku-support-build2
more haiku support
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 9 | ||||
| -rw-r--r-- | src/libc_installation.zig | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 4196eb634d..15b8f7c3f2 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3885,6 +3885,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, diff --git a/src/libc_installation.zig b/src/libc_installation.zig index 65bb2863f8..3567f2e22f 100644 --- a/src/libc_installation.zig +++ b/src/libc_installation.zig @@ -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"; |
