diff options
| author | Al Hoang <3811822-hoanga@users.noreply.gitlab.com> | 2021-10-31 21:22:56 -0500 |
|---|---|---|
| committer | Al Hoang <3811822-hoanga@users.noreply.gitlab.com> | 2021-11-15 00:29:26 -0600 |
| commit | 406baf4b1283571c7ef28143eb35f2f24238ef3c (patch) | |
| tree | 61b0e0e7c950afb6b0347a6d722d82736e13d489 /src | |
| parent | b26b72f54051b89e6fc349f453aafe9f3a3135a5 (diff) | |
| download | zig-406baf4b1283571c7ef28143eb35f2f24238ef3c.tar.gz zig-406baf4b1283571c7ef28143eb35f2f24238ef3c.zip | |
update compilation includes for haiku
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 4fbf9933cd..899a8db25c 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -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, 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"; |
