Skip to content

Commit

Permalink
route/bison: include "nl-default.h" in lex/yacc files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thom311 committed Apr 22, 2024
1 parent 19d48b0 commit 0c16c9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/route/cls/ematch_grammar.l
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

%{
#include "nl-default.h"

#include <linux/tc_ematch/tc_em_cmp.h>

#include <netlink/netlink.h>
Expand Down
3 changes: 2 additions & 1 deletion lib/route/cls/ematch_syntax.y
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions lib/route/pktloc_syntax.y
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
%{
#include "nl-default.h"

#include <netlink/netlink.h>
#include <netlink/utils.h>
#include <netlink/route/pktloc.h>
Expand Down

0 comments on commit 0c16c9c

Please sign in to comment.