Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1 | From 3467abce1f3cfc96f9bdace7c09d95218cbcaeb1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> |
| 3 | Date: Sun, 19 Jul 2015 02:42:58 +0900 |
| 4 | Subject: [PATCH] audit: Fixed swig host contamination issue |
| 5 | |
| 6 | The audit build uses swig to generate a python wrapper. |
| 7 | Unfortunately, the swig info file references host include |
| 8 | directories. Some of these were previously noticed and |
| 9 | eliminated, but the one fixed here was not. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [embedded specific] |
| 12 | |
| 13 | Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com> |
| 14 | Signed-off-by: Joe Slater <jslater@windriver.com> |
| 15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 16 | |
| 17 | Comment: Refresh hunk from auditswig.i to fix build with linux 5.17+ |
| 18 | Reference-Commit: ee3c680c3 audit: Upgrade to 3.0.8 and fix build with linux 5.17+ |
| 19 | Signed-off-by: Akash Hadke <akash.hadke@kpit.com> |
| 20 | Signed-off-by: Akash Hadke <hadkeakash4@gmail.com> |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 21 | --- |
| 22 | bindings/swig/python3/Makefile.am | 3 ++- |
| 23 | bindings/swig/src/auditswig.i | 2 +- |
| 24 | 2 files changed, 3 insertions(+), 2 deletions(-) |
| 25 | |
| 26 | diff --git a/bindings/swig/python3/Makefile.am b/bindings/swig/python3/Makefile.am |
| 27 | index 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 | |
| 47 | diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i |
| 48 | index 7ebb373..424fb68 100644 |
| 49 | --- a/bindings/swig/src/auditswig.i |
| 50 | +++ b/bindings/swig/src/auditswig.i |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 51 | @@ -39,7 +39,7 @@ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 52 | #define __attribute(X) /*nothing*/ |
| 53 | typedef unsigned __u32; |
| 54 | typedef unsigned uid_t; |
| 55 | -%include "/usr/include/linux/audit.h" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 56 | +%include "../lib/audit.h" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 57 | #define __extension__ /*nothing*/ |
| 58 | #include <stdint.h> |
| 59 | %include "../lib/libaudit.h" |
| 60 | -- |
| 61 | 2.17.1 |
| 62 | |