libbacktrace: declare getpagesize if necessary

Fixes https://gcc.gnu.org/PR95012.
This commit is contained in:
Ian Lance Taylor
2020-05-11 10:54:46 -07:00
parent 7206f5bd06
commit 14465a9574
5 changed files with 23 additions and 1 deletions

4
mmap.c
View File

@@ -42,6 +42,10 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "backtrace.h"
#include "internal.h"
#ifndef HAVE_DECL_GETPAGESIZE
extern int getpagesize (void);
#endif
/* Memory allocation on systems that provide anonymous mmap. This
permits the backtrace functions to be invoked from a signal
handler, assuming that mmap is async-signal safe. */