summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-05-22 17:47:45 +0000
committerjkim <jkim@FreeBSD.org>2013-05-22 17:47:45 +0000
commitd752b745dff91558b15bd929d1f9aa8266169f60 (patch)
tree630e6546e0f690d92e7047c32ff5b00b80d0c1a9 /sbin/hastd
parentaa1ae06135d6b2c982d0fe68e8c58b5d05ae8c14 (diff)
downloadFreeBSD-src-d752b745dff91558b15bd929d1f9aa8266169f60.zip
FreeBSD-src-d752b745dff91558b15bd929d1f9aa8266169f60.tar.gz
Improve compatibility with old flex and fix build with GCC.
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/hast.h3
-rw-r--r--sbin/hastd/parse.y2
-rw-r--r--sbin/hastd/token.l3
3 files changed, 5 insertions, 3 deletions
diff --git a/sbin/hastd/hast.h b/sbin/hastd/hast.h
index b757994..381e195 100644
--- a/sbin/hastd/hast.h
+++ b/sbin/hastd/hast.h
@@ -259,7 +259,4 @@ struct hast_resource {
struct hastd_config *yy_config_parse(const char *config, bool exitonerror);
void yy_config_free(struct hastd_config *config);
-void yyerror(const char *);
-int yylex(void);
-
#endif /* !_HAST_H_ */
diff --git a/sbin/hastd/parse.y b/sbin/hastd/parse.y
index bd0690a..6bfb537 100644
--- a/sbin/hastd/parse.y
+++ b/sbin/hastd/parse.y
@@ -75,6 +75,8 @@ static char depth1_provname[PATH_MAX];
static char depth1_localpath[PATH_MAX];
static int depth1_metaflush;
+extern void yyerror(const char *);
+extern int yylex(void);
extern void yyrestart(FILE *);
static int isitme(const char *name);
diff --git a/sbin/hastd/token.l b/sbin/hastd/token.l
index a20efd7..e8f6760 100644
--- a/sbin/hastd/token.l
+++ b/sbin/hastd/token.l
@@ -42,6 +42,9 @@ int depth;
int lineno;
#define DP do { } while (0)
+#define YY_DECL int yylex(void)
+
+extern int yylex(void);
%}
%option noinput
OpenPOWER on IntegriCloud