Skip to content

Commit 294ef2c

Browse files
committed
POSIX: provide compatibility for older Linux environments
`_SC_SIGSTKSZ` was introduced in a semi-recent glibc version. Provide a fallback for older glibc environments so that we can support a broader set of Linux environments.
1 parent b1e2790 commit 294ef2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Utils/POSIX/FaultHandler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class FaultHandler {
3131
}
3232

3333
void installCatcher() {
34-
#if defined(__APPLE__) || defined(__FreeBSD__)
35-
long sz = SIGSTKSZ;
36-
#elif defined(__ANDROID__)
34+
#if defined(__ANDROID__)
3735
long sz = MINSIGSTKSZ;
36+
#elif defined(__APPLE__) || defined(__FreeBSD__) || !defined(_SC_SIGSTKSZ)
37+
long sz = SIGSTKSZ;
3838
#else
3939
long sz = sysconf(_SC_SIGSTKSZ);
4040
if (sz == -1)

0 commit comments

Comments
 (0)