zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit e06da10838be6bf56ce63b4e4ebfc276db3f4dce (tree)
parent 55a0016221e459c49b9f04a4b57ba84be27bba72
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue,  5 Mar 2019 16:12:19 -0500

fix translate-c

Diffstat:
Msrc/translate_c.cpp | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/translate_c.cpp b/src/translate_c.cpp @@ -4814,10 +4814,11 @@ Error parse_h_file(ZigType *import, ZigList<ErrorMsg *> *errors, const char *tar clang_argv.append("-isystem"); clang_argv.append(buf_ptr(codegen->zig_c_headers_dir)); - if (codegen->libc != nullptr) { + if (codegen->libc_include_dir != nullptr) { clang_argv.append("-isystem"); - clang_argv.append(buf_ptr(&codegen->libc->include_dir)); - + clang_argv.append(buf_ptr(codegen->libc_include_dir)); + } + if (codegen->libc != nullptr) { if (!buf_eql_buf(&codegen->libc->include_dir, &codegen->libc->sys_include_dir)) { clang_argv.append("-isystem"); clang_argv.append(buf_ptr(&codegen->libc->sys_include_dir));