kumquat-buildroot/package/audit/0003-Default-ADDR_NO_RANDOMIZE-if-not-found.patch
Clayton Shotwell 6158928a4e audit: new package
[Thomas:
 - remove S01audit, which isn't completely compliant with the
   Buildroot style.
 - make the package available only on architectures for which the
   system call tables are available, and add some comments about this
   in the .mk file.]

Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-06-17 23:34:09 +02:00

45 lines
1.4 KiB
Diff

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 ++++
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 <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>])
ALLWARNS=""
ALLDEBUG="-g"
--
1.9.1