mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
glibc: version-gate _DYNAMIC_STACK_SIZE_SOURCE
This is a patch to glibc features.h which makes _DYNAMIC_STACK_SIZE_SOURCE undefined unless the version is >= 2.34. This feature was introduced with glibc 2.34 and without this patch, code built against these headers but then run on an older glibc will end up making a call to sysconf() that returns -1 for the value of SIGSTKSZ and MINSIGSTKSZ. Closes #10713
This commit is contained in:
parent
cd5b25c5ae
commit
39083c31a5
4
lib/libc/include/generic-glibc/features.h
vendored
4
lib/libc/include/generic-glibc/features.h
vendored
@ -220,8 +220,12 @@
|
|||||||
# define _DEFAULT_SOURCE 1
|
# define _DEFAULT_SOURCE 1
|
||||||
# undef _ATFILE_SOURCE
|
# undef _ATFILE_SOURCE
|
||||||
# define _ATFILE_SOURCE 1
|
# define _ATFILE_SOURCE 1
|
||||||
|
|
||||||
|
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || __GLIBC__ > 2
|
||||||
# undef _DYNAMIC_STACK_SIZE_SOURCE
|
# undef _DYNAMIC_STACK_SIZE_SOURCE
|
||||||
# define _DYNAMIC_STACK_SIZE_SOURCE 1
|
# define _DYNAMIC_STACK_SIZE_SOURCE 1
|
||||||
|
# endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
|
/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
|
||||||
|
Loading…
Reference in New Issue
Block a user