From 6d7a35dfee10d81ddc96398749645757813802fb Mon Sep 17 00:00:00 2001
From: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
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 <clayton.shotwell@rockwellcollins.com>
auparse/interpret.c | 4 ++++
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
#include "auparse-defs.h"
+#if !HAVE_DECL_ADDR_NO_RANDOMIZE
+# define ADDR_NO_RANDOMIZE 0x0040000
/* This is from asm/ipc.h. Copying it for now as some platforms
* have broken headers. */
diff --git a/configure.ac b/configure.ac
index 2e84b07..57aec03 100644
@@ -66,6 +66,7 @@ AM_PROG_CC_C_O
AC_CHECK_DECLS([MS_DIRSYNC], [], [], [[#include <sys/mount.h>]])
AC_CHECK_DECLS([AUDIT_FEATURE_VERSION], [], [], [[#include <linux/audit.h>]])
AC_CHECK_DECLS([AUDIT_VERSION_BACKLOG_WAIT_TIME], [], [], [[#include <linux/audit.h>]])
+AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])