blob: 65ab2dfd8c49cd55adbe1abe64bc0eb448528411 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001From 18a08fb7f0443f8bde83393bd6f69e23a04246b3 Mon Sep 17 00:00:00 2001
2From: Pablo Neira Ayuso <pablo@netfilter.org>
3Date: Tue, 22 Feb 2022 00:56:36 +0100
4Subject: [PATCH] examples: compile with `make check' and add AM_CPPFLAGS
5
6Compile examples via `make check' like libnftnl does. Use AM_CPPFLAGS to
7specify local headers via -I.
8
9Unfortunately, `make distcheck' did not catch this compile time error in
10my system, since it was using the nftables/libnftables.h file of the
11previous nftables release.
12
13Fixes: 5b364657a35f ("build: missing SUBIRS update")
14Fixes: caf2a6ad2d22 ("examples: add libnftables example program")
15Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
16
17Upstream-Status: Backport
18[http://git.netfilter.org/nftables/commit/?id=18a08fb7f0443f8bde83393bd6f69e23a04246b3]
19
20Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
21---
22 examples/Makefile.am | 4 +++-
23 1 file changed, 3 insertions(+), 1 deletion(-)
24
25diff --git a/examples/Makefile.am b/examples/Makefile.am
26index c972170d..3b8b0b67 100644
27--- a/examples/Makefile.am
28+++ b/examples/Makefile.am
29@@ -1,4 +1,6 @@
30-noinst_PROGRAMS = nft-buffer \
31+check_PROGRAMS = nft-buffer \
32 nft-json-file
33
34+AM_CPPFLAGS = -I$(top_srcdir)/include
35+
36 LDADD = $(top_builddir)/src/libnftables.la
37--
382.25.1
39