summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2024-04-22 07:02:26 (GMT)
committerThomas Haller <thaller@redhat.com>2024-04-22 07:57:50 (GMT)
commit0c16c9cbd66b068dc010d4944d73f94e8faea389 (patch)
tree97953b2188c6d5f410355532dc605bd0460bc6b5
parent19d48b0fe924085f28c9410fae448d385f5f9a23 (diff)
downloadlibnl-0c16c9cbd66b068dc010d4944d73f94e8faea389.zip
libnl-0c16c9cbd66b068dc010d4944d73f94e8faea389.tar.gz
libnl-0c16c9cbd66b068dc010d4944d73f94e8faea389.tar.bz2
route/bison: include "nl-default.h" in lex/yacc files
For building all of our source files, we should include first "config.h". This ensures that we have for example NL_DEBUG available. Actually, "config.h" is included by "nl-default.h". In turn this means, all our source files should first include "nl-default.h", which drags in a set of default headers. Fix the lex/yacc files for that.
-rw-r--r--lib/route/cls/ematch_grammar.l2
-rw-r--r--lib/route/cls/ematch_syntax.y3
-rw-r--r--lib/route/pktloc_syntax.y2
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/route/cls/ematch_grammar.l b/lib/route/cls/ematch_grammar.l
index 1035079..eb16a89 100644
--- a/lib/route/cls/ematch_grammar.l
+++ b/lib/route/cls/ematch_grammar.l
@@ -4,6 +4,8 @@
*/
%{
+ #include "nl-default.h"
+
#include <linux/tc_ematch/tc_em_cmp.h>
#include <netlink/netlink.h>
diff --git a/lib/route/cls/ematch_syntax.y b/lib/route/cls/ematch_syntax.y
index 961ee43..bc0cc9c 100644
--- a/lib/route/cls/ematch_syntax.y
+++ b/lib/route/cls/ematch_syntax.y
@@ -4,8 +4,9 @@
*/
%{
-#include <linux/tc_ematch/tc_em_meta.h>
+#include "nl-default.h"
+#include <linux/tc_ematch/tc_em_meta.h>
#include <linux/tc_ematch/tc_em_cmp.h>
#include <netlink/netlink.h>
diff --git a/lib/route/pktloc_syntax.y b/lib/route/pktloc_syntax.y
index 661463a..505f4c8 100644
--- a/lib/route/pktloc_syntax.y
+++ b/lib/route/pktloc_syntax.y
@@ -1,4 +1,6 @@
%{
+#include "nl-default.h"
+
#include <netlink/netlink.h>
#include <netlink/utils.h>
#include <netlink/route/pktloc.h>