Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
59 lines
1.3 KiB
Diff
59 lines
1.3 KiB
Diff
Add a new header file that provides function prototypes for flex/bison
|
|
integration. This avoids implicit function declarations and build
|
|
failures with future compilers.
|
|
|
|
diff --git a/src/acllex.l b/src/acllex.l
|
|
index 74dd8882f2fed262..3ab5e3c0cd897f70 100644
|
|
--- a/src/acllex.l
|
|
+++ b/src/acllex.l
|
|
@@ -11,6 +11,7 @@
|
|
|
|
#include "acl2.h"
|
|
#include "aclyacc.h"
|
|
+#include "aclparse.h"
|
|
%}
|
|
|
|
byte ([0-9]+)
|
|
diff --git a/src/aclparse.h b/src/aclparse.h
|
|
new file mode 100644
|
|
index 0000000000000000..f113fc26d7513042
|
|
--- /dev/null
|
|
+++ b/src/aclparse.h
|
|
@@ -0,0 +1,3 @@
|
|
+int yylex (void);
|
|
+void yyerror(const char *msg);
|
|
+int yyparse (void);
|
|
diff --git a/src/aclyacc.y b/src/aclyacc.y
|
|
index 60001b6e4c820271..711b7eb169b59aba 100644
|
|
--- a/src/aclyacc.y
|
|
+++ b/src/aclyacc.y
|
|
@@ -2,6 +2,7 @@
|
|
#include <ftlib.h>
|
|
#include "acl2.h"
|
|
#include <stdio.h> /* XXX REMOVE */
|
|
+#include "aclparse.h"
|
|
|
|
/* XXX remove */
|
|
unsigned char fmt_buf[32];
|
|
diff --git a/src/flow-filter.c b/src/flow-filter.c
|
|
index 3c1bfea989b2a129..305e2ed4399ca33d 100644
|
|
--- a/src/flow-filter.c
|
|
+++ b/src/flow-filter.c
|
|
@@ -47,6 +47,7 @@
|
|
#endif
|
|
|
|
#include "acl2.h"
|
|
+#include "aclparse.h"
|
|
|
|
/*
|
|
* TODO
|
|
@@ -58,9 +59,7 @@ int ip_net_only;
|
|
|
|
extern struct acl_list acl_list;
|
|
|
|
-int yyparse (void);
|
|
void usage(void);
|
|
-void yyerror(const char *msg);
|
|
|
|
extern FILE *yyin;
|
|
extern char *yytext;
|