From 6d7a35dfee10d81ddc96398749645757813802fb Mon Sep 17 00:00:00 2001 From: Clayton Shotwell Date: Tue, 31 Mar 2015 08:00:21 -0500 Subject: [PATCH] Default ADDR_NO_RANDOMIZE if not found Some older toolchains do not declare ADDR_NO_RANDOMIZE. Add a check for it during configure and default it if it is not found. Signed-off-by: Clayton Shotwell --- auparse/interpret.c | 4 ++++ configure.ac | 1 + 2 files changed, 5 insertions(+) diff --git a/auparse/interpret.c b/auparse/interpret.c index 0dcaa9f..a9d6691 100644 --- a/auparse/interpret.c +++ b/auparse/interpret.c @@ -53,6 +53,10 @@ #include "auparse-defs.h" #include "gen_tables.h" +#if !HAVE_DECL_ADDR_NO_RANDOMIZE +# define ADDR_NO_RANDOMIZE 0x0040000 +#endif + /* This is from asm/ipc.h. Copying it for now as some platforms * have broken headers. */ #define SEMOP 1 diff --git a/configure.ac b/configure.ac index 2e84b07..57aec03 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,7 @@ AM_PROG_CC_C_O AC_CHECK_DECLS([MS_DIRSYNC], [], [], [[#include ]]) AC_CHECK_DECLS([AUDIT_FEATURE_VERSION], [], [], [[#include ]]) AC_CHECK_DECLS([AUDIT_VERSION_BACKLOG_WAIT_TIME], [], [], [[#include ]]) +AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include ]) ALLWARNS="" ALLDEBUG="-g" -- 1.9.1