Skip to content

Commit 291afcf

Browse files
committedJul 3, 2018
fix runtime libc detection depending on locale
closes #1165
1 parent 27fc49f commit 291afcf

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed
 

‎src/analyze.cpp

+2-10
Original file line numberDiff line numberDiff line change
@@ -4417,22 +4417,14 @@ Buf *get_linux_libc_include_path(void) {
44174417
}
44184418
char *prev_newline = buf_ptr(out_stderr);
44194419
ZigList<const char *> search_paths = {};
4420-
bool found_search_paths = false;
44214420
for (;;) {
44224421
char *newline = strchr(prev_newline, '\n');
44234422
if (newline == nullptr) {
4424-
zig_panic("unable to determine libc include path: bad output from C compiler command");
4423+
break;
44254424
}
44264425
*newline = 0;
4427-
if (found_search_paths) {
4428-
if (strcmp(prev_newline, "End of search list.") == 0) {
4429-
break;
4430-
}
4426+
if (prev_newline[0] == ' ') {
44314427
search_paths.append(prev_newline);
4432-
} else {
4433-
if (strcmp(prev_newline, "#include <...> search starts here:") == 0) {
4434-
found_search_paths = true;
4435-
}
44364428
}
44374429
prev_newline = newline + 1;
44384430
}

0 commit comments

Comments
 (0)