Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 1 | From 9a32d42dfc6713fd0085dd4563a934afc30ec097 Mon Sep 17 00:00:00 2001 |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> |
| 3 | Date: Sun, 19 Jul 2015 02:42:58 +0900 |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 4 | Subject: [PATCH] Fixed swig host contamination issue |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 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> |
| 16 | --- |
| 17 | bindings/swig/python3/Makefile.am | 3 ++- |
| 18 | bindings/swig/src/auditswig.i | 2 +- |
| 19 | 2 files changed, 3 insertions(+), 2 deletions(-) |
| 20 | |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 21 | diff --git a/bindings/swig/python3/Makefile.am b/bindings/swig/python3/Makefile.am |
| 22 | index 6131e80d..2fb7207b 100644 |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 23 | --- a/bindings/swig/python3/Makefile.am |
| 24 | +++ b/bindings/swig/python3/Makefile.am |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 25 | @@ -23,6 +23,7 @@ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 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) |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 33 | @@ -37,7 +38,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudi |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 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 | |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 42 | diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i |
| 43 | index 9a2c5661..6cbb7295 100644 |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 44 | --- a/bindings/swig/src/auditswig.i |
| 45 | +++ b/bindings/swig/src/auditswig.i |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 46 | @@ -43,7 +43,7 @@ typedef unsigned uid_t; |
| 47 | * generating setters against them: https://github.com/swig/swig/issues/1699 |
| 48 | */ |
| 49 | %ignore audit_rule_data::buf; |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 50 | -%include "/usr/include/linux/audit.h" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 51 | +%include "../lib/audit.h" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 52 | #define __extension__ /*nothing*/ |
| 53 | %include <stdint.i> |
| 54 | %include "../lib/libaudit.h" |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 55 | -- |
| 56 | 2.25.1 |
| 57 | |