mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-03-13 22:09:07 +08:00
libbacktrace: declare getpagesize if necessary
Fixes https://gcc.gnu.org/PR95012.
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define to 1 if you have the declaration of `getpagesize', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRNLEN
|
||||
|
||||
10
configure
vendored
10
configure
vendored
@@ -12453,6 +12453,16 @@ fi
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_STRNLEN $ac_have_decl
|
||||
_ACEOF
|
||||
ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
|
||||
if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_GETPAGESIZE $ac_have_decl
|
||||
_ACEOF
|
||||
|
||||
for ac_func in lstat readlink
|
||||
do :
|
||||
|
||||
@@ -383,7 +383,7 @@ if test "$have_fcntl" = "yes"; then
|
||||
[Define to 1 if you have the fcntl function])
|
||||
fi
|
||||
|
||||
AC_CHECK_DECLS(strnlen)
|
||||
AC_CHECK_DECLS([strnlen, getpagesize])
|
||||
AC_CHECK_FUNCS(lstat readlink)
|
||||
|
||||
# Check for getexecname function.
|
||||
|
||||
4
mmap.c
4
mmap.c
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user