blob: 39a090c83b7d109988e09e79dba214b0ca4e29a3 [file] [log] [blame]
Patrick Williams213cb262021-08-07 19:21:33 -05001From 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>
Patrick Williams2390b1b2022-11-03 13:47:49 -050016
17Comment: Refresh hunk from auditswig.i to fix build with linux 5.17+
18Reference-Commit: ee3c680c3 audit: Upgrade to 3.0.8 and fix build with linux 5.17+
19Signed-off-by: Akash Hadke <akash.hadke@kpit.com>
20Signed-off-by: Akash Hadke <hadkeakash4@gmail.com>
Patrick Williams213cb262021-08-07 19:21:33 -050021---
22 bindings/swig/python3/Makefile.am | 3 ++-
23 bindings/swig/src/auditswig.i | 2 +-
24 2 files changed, 3 insertions(+), 2 deletions(-)
25
26diff --git a/bindings/swig/python3/Makefile.am b/bindings/swig/python3/Makefile.am
27index 9938418..fa46aac 100644
28--- a/bindings/swig/python3/Makefile.am
29+++ b/bindings/swig/python3/Makefile.am
30@@ -22,6 +22,7 @@
31 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
32 AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing $(PYTHON3_CFLAGS)
33 AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES)
34+STDINC ?= /usr/include
35 LIBS = $(top_builddir)/lib/libaudit.la
36 SWIG_FLAGS = -python -py3 -modern
37 SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib $(PYTHON3_INCLUDES)
38@@ -37,7 +38,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudi
39 _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la
40 nodist__audit_la_SOURCES = audit_wrap.c
41 audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i
42- swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i
43+ swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} -I$(STDINC) ${srcdir}/../src/auditswig.i
44
45 CLEANFILES = audit.py* audit_wrap.c *~
46
47diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i
48index 7ebb373..424fb68 100644
49--- a/bindings/swig/src/auditswig.i
50+++ b/bindings/swig/src/auditswig.i
Patrick Williams2390b1b2022-11-03 13:47:49 -050051@@ -39,7 +39,7 @@
Patrick Williams213cb262021-08-07 19:21:33 -050052 #define __attribute(X) /*nothing*/
53 typedef unsigned __u32;
54 typedef unsigned uid_t;
55-%include "/usr/include/linux/audit.h"
Patrick Williams2390b1b2022-11-03 13:47:49 -050056+%include "../lib/audit.h"
Patrick Williams213cb262021-08-07 19:21:33 -050057 #define __extension__ /*nothing*/
58 #include <stdint.h>
59 %include "../lib/libaudit.h"
60--
612.17.1
62