1From 3d13f92c1bb293523670ba01aea7e655b00a6709 Mon Sep 17 00:00:00 2001 2From: Li xin <lixin.fnst@cn.fujitsu.com> 3Date: Sun, 19 Jul 2015 02:42:58 +0900 4Subject: [PATCH] audit: Fixed swig host contamination issue 5 6The audit build uses swig to generate a python wrapper. 7Unfortunately, the swig info file references host include 8directories. Some of these were previously noticed and 9eliminated, but the one fixed here was not. 10 11Upstream-Status: Inappropriate [embedded specific] 12 13Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com> 14Signed-off-by: Joe Slater <jslater@windriver.com> 15Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 16--- 17 bindings/swig/python3/Makefile.am | 3 ++- 18 bindings/swig/src/auditswig.i | 2 +- 19 2 files changed, 3 insertions(+), 2 deletions(-) 20 21--- a/bindings/swig/python3/Makefile.am 22+++ b/bindings/swig/python3/Makefile.am 23@@ -23,6 +23,7 @@ 24 CONFIG_CLEAN_FILES = *.loT *.rej *.orig 25 AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing $(PYTHON3_CFLAGS) 26 AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) 27+STDINC ?= /usr/include 28 LIBS = $(top_builddir)/lib/libaudit.la 29 SWIG_FLAGS = -python -py3 -modern 30 SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) 31@@ -37,7 +38,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/li 32 _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la 33 nodist__audit_la_SOURCES = audit_wrap.c 34 audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i 35- swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i 36+ swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} -I$(STDINC) ${srcdir}/../src/auditswig.i 37 38 CLEANFILES = audit.py* audit_wrap.c *~ 39 40--- a/bindings/swig/src/auditswig.i 41+++ b/bindings/swig/src/auditswig.i 42@@ -39,7 +39,7 @@ signed 43 #define __attribute(X) /*nothing*/ 44 typedef unsigned __u32; 45 typedef unsigned uid_t; 46-%include "/usr/include/linux/audit.h" 47+%include "../lib/audit.h" 48 #define __extension__ /*nothing*/ 49 %include <stdint.i> 50 %include "../lib/libaudit.h" 51