1From 3467abce1f3cfc96f9bdace7c09d95218cbcaeb1 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 21diff --git a/bindings/swig/python3/Makefile.am b/bindings/swig/python3/Makefile.am 22index 9938418..fa46aac 100644 23--- a/bindings/swig/python3/Makefile.am 24+++ b/bindings/swig/python3/Makefile.am 25@@ -22,6 +22,7 @@ 26 CONFIG_CLEAN_FILES = *.loT *.rej *.orig 27 AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing $(PYTHON3_CFLAGS) 28 AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) 29+STDINC ?= /usr/include 30 LIBS = $(top_builddir)/lib/libaudit.la 31 SWIG_FLAGS = -python -py3 -modern 32 SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES) 33@@ -37,7 +38,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudi 34 _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la 35 nodist__audit_la_SOURCES = audit_wrap.c 36 audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i 37- swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i 38+ swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} -I$(STDINC) ${srcdir}/../src/auditswig.i 39 40 CLEANFILES = audit.py* audit_wrap.c *~ 41 42diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i 43index 7ebb373..424fb68 100644 44--- a/bindings/swig/src/auditswig.i 45+++ b/bindings/swig/src/auditswig.i 46@@ -39,7 +39,7 @@ signed 47 #define __attribute(X) /*nothing*/ 48 typedef unsigned __u32; 49 typedef unsigned uid_t; 50-%include "/usr/include/linux/audit.h" 51+%include "linux/audit.h" 52 #define __extension__ /*nothing*/ 53 #include <stdint.h> 54 %include "../lib/libaudit.h" 55-- 562.17.1 57 58