commit 201033d83b80d65380aaade37b76eafa17258f16 (tree)
parent 8692c6fc0da831421855c27008dc046dcf59fca7
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 8 Jul 2019 11:38:14 -0400
avoid dependency on linux/limits.h header
it was causing a problem on the CI
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/glibc.cpp b/src/glibc.cpp
@@ -352,7 +352,6 @@ bool eql_glibc_target(const ZigTarget *a, const ZigTarget *b) {
#ifdef ZIG_OS_LINUX
#include <unistd.h>
-#include <linux/limits.h>
Error glibc_detect_native_version(ZigGLibCVersion *glibc_ver) {
Buf *self_libc_path = get_self_libc_path();
if (self_libc_path == nullptr) {
@@ -365,7 +364,7 @@ Error glibc_detect_native_version(ZigGLibCVersion *glibc_ver) {
return ErrorUnknownABI;
}
Buf *link_name = buf_alloc();
- buf_resize(link_name, PATH_MAX);
+ buf_resize(link_name, 4096);
ssize_t amt = readlink(buf_ptr(self_libc_path), buf_ptr(link_name), buf_len(link_name));
if (amt == -1) {
return ErrorUnknownABI;