Skip to content

Commit

Permalink
Stub out SIGSTKSZ to fix build on GNU libc >= 2.34.
Browse files Browse the repository at this point in the history
Fixes #9

GitOrigin-RevId: f64e7cbadc158e169f4e234feea7bff1b1acb12d
  • Loading branch information
jmillikin committed Apr 28, 2022
1 parent 8a3bc50 commit 2b6ba2c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions m4/internal/gnulib/gnulib.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ static const char * _replaced_get_charset_aliases (void)
"static _Noreturn void": "static _Noreturn __attribute_noreturn__ void",
})

# If _GNU_SOURCE is defined, some versions of GNU libc define SIGSTKSZ to
# be a function call. This breaks an assumption in gnulib that SIGSTKSZ is
# a macro constant.
#
# If undefined, gnulib sets it to a reasonable default instead of failing
# to compile.
#
# https://github.com/jmillikin/rules_m4/issues/9
ctx.template("gnulib/lib/c-stack.c", "gnulib/lib/c-stack.c", substitutions = {
"SIGSTKSZ": "GNULIB_SIGSTKSZ",
})

_WINDOWS_STDLIB_SHIMS = [
"alloca",
"errno",
Expand Down

0 comments on commit 2b6ba2c

Please sign in to comment.