| ... | @@ -9,6 +9,7 @@ const build_options = @import("build_options"); | ... | @@ -9,6 +9,7 @@ const build_options = @import("build_options"); |
| 9 | const is_darwin = Target.current.isDarwin(); | 9 | const is_darwin = Target.current.isDarwin(); |
| 10 | const is_windows = Target.current.os.tag == .windows; | 10 | const is_windows = Target.current.os.tag == .windows; |
| 11 | const is_gnu = Target.current.isGnu(); | 11 | const is_gnu = Target.current.isGnu(); |
| | 12 | const is_haiku = Target.current.os.tag == .haiku; |
| 12 | | 13 | |
| 13 | const log = std.log.scoped(.libc_installation); | 14 | const log = std.log.scoped(.libc_installation); |
| 14 | | 15 | |
| ... | @@ -279,8 +280,14 @@ pub const LibCInstallation = struct { | ... | @@ -279,8 +280,14 @@ pub const LibCInstallation = struct { |
| 279 | return error.CCompilerCannotFindHeaders; | 280 | return error.CCompilerCannotFindHeaders; |
| 280 | } | 281 | } |
| 281 | | 282 | |
| 282 | const include_dir_example_file = "stdlib.h"; | 283 | const include_dir_example_file = if (is_haiku) "posix/stdlib.h" else "stdlib.h"; |
| 283 | const sys_include_dir_example_file = if (is_windows) "sys\\types.h" else "sys/errno.h"; | 284 | const sys_include_dir_example_file = if (is_windows) |
| | 285 | "sys\\types.h" |
| | 286 | else if (is_haiku) |
| | 287 | "posix/errno.h" |
| | 288 | else |
| | 289 | "sys/errno.h" |
| | 290 | ; |
| 284 | | 291 | |
| 285 | var path_i: usize = 0; | 292 | var path_i: usize = 0; |
| 286 | while (path_i < search_paths.items.len) : (path_i += 1) { | 293 | while (path_i < search_paths.items.len) : (path_i += 1) { |