diff options
-rw-r--r-- | sbin/devd/parse.y | 1 | ||||
-rw-r--r-- | sbin/hastd/hast.h | 1 | ||||
-rw-r--r-- | sbin/hastd/parse.y | 586 | ||||
-rw-r--r-- | usr.bin/ar/acpyacc.y | 1 | ||||
-rw-r--r-- | usr.bin/bc/bc.y | 1 | ||||
-rw-r--r-- | usr.bin/find/getdate.y | 2 | ||||
-rw-r--r-- | usr.bin/m4/parser.y | 1 | ||||
-rw-r--r-- | usr.bin/mkcsmapper/ldef.h | 1 | ||||
-rw-r--r-- | usr.bin/mklocale/extern.h | 1 | ||||
-rw-r--r-- | usr.sbin/bluetooth/bthidd/parser.y | 2 | ||||
-rw-r--r-- | usr.sbin/bluetooth/hcsecd/parser.y | 1 | ||||
-rw-r--r-- | usr.sbin/config/config.h | 1 | ||||
-rw-r--r-- | usr.sbin/config/main.c | 1 | ||||
-rw-r--r-- | usr.sbin/fifolog/lib/getdate.y | 2 | ||||
-rw-r--r-- | usr.sbin/jail/config.c | 2 | ||||
-rw-r--r-- | usr.sbin/jail/jailp.h | 1 |
16 files changed, 302 insertions, 303 deletions
diff --git a/sbin/devd/parse.y b/sbin/devd/parse.y index 28b8a908adb1..6334b4e5a27b 100644 --- a/sbin/devd/parse.y +++ b/sbin/devd/parse.y @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#include <sys/cdefs.h> #include "devd.h" #include <stdio.h> #include <string.h> diff --git a/sbin/hastd/hast.h b/sbin/hastd/hast.h index 94e572426dd8..263e98410944 100644 --- a/sbin/hastd/hast.h +++ b/sbin/hastd/hast.h @@ -244,6 +244,5 @@ void yy_config_free(struct hastd_config *config); void yyerror(const char *); int yylex(void); -int yyparse(void); #endif /* !_HAST_H_ */ diff --git a/sbin/hastd/parse.y b/sbin/hastd/parse.y index 2c16f34f6747..a20b61aa1f5a 100644 --- a/sbin/hastd/parse.y +++ b/sbin/hastd/parse.y @@ -77,296 +77,9 @@ static int depth1_metaflush; extern void yyrestart(FILE *); -static int -isitme(const char *name) -{ - char buf[MAXHOSTNAMELEN]; - char *pos; - size_t bufsize; - - /* - * First check if the given name matches our full hostname. - */ - if (gethostname(buf, sizeof(buf)) < 0) { - pjdlog_errno(LOG_ERR, "gethostname() failed"); - return (-1); - } - if (strcmp(buf, name) == 0) - return (1); - - /* - * Now check if it matches first part of the host name. - */ - pos = strchr(buf, '.'); - if (pos != NULL && (size_t)(pos - buf) == strlen(name) && - strncmp(buf, name, pos - buf) == 0) { - return (1); - } - - /* - * At the end check if name is equal to our host's UUID. - */ - bufsize = sizeof(buf); - if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0) { - pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostuuid) failed"); - return (-1); - } - if (strcasecmp(buf, name) == 0) - return (1); - - /* - * Looks like this isn't about us. - */ - return (0); -} - -static bool -family_supported(int family) -{ - int sock; - - sock = socket(family, SOCK_STREAM, 0); - if (sock == -1 && errno == EPROTONOSUPPORT) - return (false); - if (sock >= 0) - (void)close(sock); - return (true); -} - -static int -node_names(char **namesp) -{ - static char names[MAXHOSTNAMELEN * 3]; - char buf[MAXHOSTNAMELEN]; - char *pos; - size_t bufsize; - - if (gethostname(buf, sizeof(buf)) < 0) { - pjdlog_errno(LOG_ERR, "gethostname() failed"); - return (-1); - } - - /* First component of the host name. */ - pos = strchr(buf, '.'); - if (pos != NULL && pos != buf) { - (void)strlcpy(names, buf, MIN((size_t)(pos - buf + 1), - sizeof(names))); - (void)strlcat(names, ", ", sizeof(names)); - } - - /* Full host name. */ - (void)strlcat(names, buf, sizeof(names)); - (void)strlcat(names, ", ", sizeof(names)); - - /* Host UUID. */ - bufsize = sizeof(buf); - if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0) { - pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostuuid) failed"); - return (-1); - } - (void)strlcat(names, buf, sizeof(names)); - - *namesp = names; - - return (0); -} - -void -yyerror(const char *str) -{ - - pjdlog_error("Unable to parse configuration file at line %d near '%s': %s", - lineno, yytext, str); -} - -struct hastd_config * -yy_config_parse(const char *config, bool exitonerror) -{ - int ret; - - curres = NULL; - mynode = false; - depth = 0; - lineno = 0; - - depth0_timeout = HAST_TIMEOUT; - depth0_replication = HAST_REPLICATION_FULLSYNC; - depth0_checksum = HAST_CHECKSUM_NONE; - depth0_compression = HAST_COMPRESSION_HOLE; - strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control)); - strlcpy(depth0_pidfile, HASTD_PIDFILE, sizeof(depth0_pidfile)); - TAILQ_INIT(&depth0_listen); - strlcpy(depth0_listen_tcp4, HASTD_LISTEN_TCP4, - sizeof(depth0_listen_tcp4)); - strlcpy(depth0_listen_tcp6, HASTD_LISTEN_TCP6, - sizeof(depth0_listen_tcp6)); - depth0_exec[0] = '\0'; - depth0_metaflush = 1; - - lconfig = calloc(1, sizeof(*lconfig)); - if (lconfig == NULL) { - pjdlog_error("Unable to allocate memory for configuration."); - if (exitonerror) - exit(EX_TEMPFAIL); - return (NULL); - } - - TAILQ_INIT(&lconfig->hc_listen); - TAILQ_INIT(&lconfig->hc_resources); - - yyin = fopen(config, "r"); - if (yyin == NULL) { - pjdlog_errno(LOG_ERR, "Unable to open configuration file %s", - config); - yy_config_free(lconfig); - if (exitonerror) - exit(EX_OSFILE); - return (NULL); - } - yyrestart(yyin); - ret = yyparse(); - fclose(yyin); - if (ret != 0) { - yy_config_free(lconfig); - if (exitonerror) - exit(EX_CONFIG); - return (NULL); - } - - /* - * Let's see if everything is set up. - */ - if (lconfig->hc_controladdr[0] == '\0') { - strlcpy(lconfig->hc_controladdr, depth0_control, - sizeof(lconfig->hc_controladdr)); - } - if (lconfig->hc_pidfile[0] == '\0') { - strlcpy(lconfig->hc_pidfile, depth0_pidfile, - sizeof(lconfig->hc_pidfile)); - } - if (!TAILQ_EMPTY(&depth0_listen)) - TAILQ_CONCAT(&lconfig->hc_listen, &depth0_listen, hl_next); - if (TAILQ_EMPTY(&lconfig->hc_listen)) { - struct hastd_listen *lst; - - if (family_supported(AF_INET)) { - lst = calloc(1, sizeof(*lst)); - if (lst == NULL) { - pjdlog_error("Unable to allocate memory for listen address."); - yy_config_free(lconfig); - if (exitonerror) - exit(EX_TEMPFAIL); - return (NULL); - } - (void)strlcpy(lst->hl_addr, depth0_listen_tcp4, - sizeof(lst->hl_addr)); - TAILQ_INSERT_TAIL(&lconfig->hc_listen, lst, hl_next); - } else { - pjdlog_debug(1, - "No IPv4 support in the kernel, not listening on IPv4 address."); - } - if (family_supported(AF_INET6)) { - lst = calloc(1, sizeof(*lst)); - if (lst == NULL) { - pjdlog_error("Unable to allocate memory for listen address."); - yy_config_free(lconfig); - if (exitonerror) - exit(EX_TEMPFAIL); - return (NULL); - } - (void)strlcpy(lst->hl_addr, depth0_listen_tcp6, - sizeof(lst->hl_addr)); - TAILQ_INSERT_TAIL(&lconfig->hc_listen, lst, hl_next); - } else { - pjdlog_debug(1, - "No IPv6 support in the kernel, not listening on IPv6 address."); - } - if (TAILQ_EMPTY(&lconfig->hc_listen)) { - pjdlog_error("No address to listen on."); - yy_config_free(lconfig); - if (exitonerror) - exit(EX_TEMPFAIL); - return (NULL); - } - } - TAILQ_FOREACH(curres, &lconfig->hc_resources, hr_next) { - PJDLOG_ASSERT(curres->hr_provname[0] != '\0'); - PJDLOG_ASSERT(curres->hr_localpath[0] != '\0'); - PJDLOG_ASSERT(curres->hr_remoteaddr[0] != '\0'); - - if (curres->hr_replication == -1) { - /* - * Replication is not set at resource-level. - * Use global or default setting. - */ - curres->hr_replication = depth0_replication; - } - if (curres->hr_replication == HAST_REPLICATION_MEMSYNC) { - pjdlog_warning("Replication mode \"%s\" is not implemented, falling back to \"%s\".", - "memsync", "fullsync"); - curres->hr_replication = HAST_REPLICATION_FULLSYNC; - } - if (curres->hr_checksum == -1) { - /* - * Checksum is not set at resource-level. - * Use global or default setting. - */ - curres->hr_checksum = depth0_checksum; - } - if (curres->hr_compression == -1) { - /* - * Compression is not set at resource-level. - * Use global or default setting. - */ - curres->hr_compression = depth0_compression; - } - if (curres->hr_timeout == -1) { - /* - * Timeout is not set at resource-level. - * Use global or default setting. - */ - curres->hr_timeout = depth0_timeout; - } - if (curres->hr_exec[0] == '\0') { - /* - * Exec is not set at resource-level. - * Use global or default setting. - */ - strlcpy(curres->hr_exec, depth0_exec, - sizeof(curres->hr_exec)); - } - if (curres->hr_metaflush == -1) { - /* - * Metaflush is not set at resource-level. - * Use global or default setting. - */ - curres->hr_metaflush = depth0_metaflush; - } - } - - return (lconfig); -} - -void -yy_config_free(struct hastd_config *config) -{ - struct hastd_listen *lst; - struct hast_resource *res; - - while ((lst = TAILQ_FIRST(&depth0_listen)) != NULL) { - TAILQ_REMOVE(&depth0_listen, lst, hl_next); - free(lst); - } - while ((lst = TAILQ_FIRST(&config->hc_listen)) != NULL) { - TAILQ_REMOVE(&config->hc_listen, lst, hl_next); - free(lst); - } - while ((res = TAILQ_FIRST(&config->hc_resources)) != NULL) { - TAILQ_REMOVE(&config->hc_resources, res, hr_next); - free(res); - } - free(config); -} +static int isitme(const char *name); +static bool family_supported(int family); +static int node_names(char **namesp); %} %token CONTROL PIDFILE LISTEN REPLICATION CHECKSUM COMPRESSION METAFLUSH @@ -1004,3 +717,296 @@ source_statement: SOURCE STR free($2); } ; + +%% + +static int +isitme(const char *name) +{ + char buf[MAXHOSTNAMELEN]; + char *pos; + size_t bufsize; + + /* + * First check if the given name matches our full hostname. + */ + if (gethostname(buf, sizeof(buf)) < 0) { + pjdlog_errno(LOG_ERR, "gethostname() failed"); + return (-1); + } + if (strcmp(buf, name) == 0) + return (1); + + /* + * Now check if it matches first part of the host name. + */ + pos = strchr(buf, '.'); + if (pos != NULL && (size_t)(pos - buf) == strlen(name) && + strncmp(buf, name, pos - buf) == 0) { + return (1); + } + + /* + * At the end check if name is equal to our host's UUID. + */ + bufsize = sizeof(buf); + if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0) { + pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostuuid) failed"); + return (-1); + } + if (strcasecmp(buf, name) == 0) + return (1); + + /* + * Looks like this isn't about us. + */ + return (0); +} + +static bool +family_supported(int family) +{ + int sock; + + sock = socket(family, SOCK_STREAM, 0); + if (sock == -1 && errno == EPROTONOSUPPORT) + return (false); + if (sock >= 0) + (void)close(sock); + return (true); +} + +static int +node_names(char **namesp) +{ + static char names[MAXHOSTNAMELEN * 3]; + char buf[MAXHOSTNAMELEN]; + char *pos; + size_t bufsize; + + if (gethostname(buf, sizeof(buf)) < 0) { + pjdlog_errno(LOG_ERR, "gethostname() failed"); + return (-1); + } + + /* First component of the host name. */ + pos = strchr(buf, '.'); + if (pos != NULL && pos != buf) { + (void)strlcpy(names, buf, MIN((size_t)(pos - buf + 1), + sizeof(names))); + (void)strlcat(names, ", ", sizeof(names)); + } + + /* Full host name. */ + (void)strlcat(names, buf, sizeof(names)); + (void)strlcat(names, ", ", sizeof(names)); + + /* Host UUID. */ + bufsize = sizeof(buf); + if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0) { + pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostuuid) failed"); + return (-1); + } + (void)strlcat(names, buf, sizeof(names)); + + *namesp = names; + + return (0); +} + +void +yyerror(const char *str) +{ + + pjdlog_error("Unable to parse configuration file at line %d near '%s': %s", + lineno, yytext, str); +} + +struct hastd_config * +yy_config_parse(const char *config, bool exitonerror) +{ + int ret; + + curres = NULL; + mynode = false; + depth = 0; + lineno = 0; + + depth0_timeout = HAST_TIMEOUT; + depth0_replication = HAST_REPLICATION_FULLSYNC; + depth0_checksum = HAST_CHECKSUM_NONE; + depth0_compression = HAST_COMPRESSION_HOLE; + strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control)); + strlcpy(depth0_pidfile, HASTD_PIDFILE, sizeof(depth0_pidfile)); + TAILQ_INIT(&depth0_listen); + strlcpy(depth0_listen_tcp4, HASTD_LISTEN_TCP4, + sizeof(depth0_listen_tcp4)); + strlcpy(depth0_listen_tcp6, HASTD_LISTEN_TCP6, + sizeof(depth0_listen_tcp6)); + depth0_exec[0] = '\0'; + depth0_metaflush = 1; + + lconfig = calloc(1, sizeof(*lconfig)); + if (lconfig == NULL) { + pjdlog_error("Unable to allocate memory for configuration."); + if (exitonerror) + exit(EX_TEMPFAIL); + return (NULL); + } + + TAILQ_INIT(&lconfig->hc_listen); + TAILQ_INIT(&lconfig->hc_resources); + + yyin = fopen(config, "r"); + if (yyin == NULL) { + pjdlog_errno(LOG_ERR, "Unable to open configuration file %s", + config); + yy_config_free(lconfig); + if (exitonerror) + exit(EX_OSFILE); + return (NULL); + } + yyrestart(yyin); + ret = yyparse(); + fclose(yyin); + if (ret != 0) { + yy_config_free(lconfig); + if (exitonerror) + exit(EX_CONFIG); + return (NULL); + } + + /* + * Let's see if everything is set up. + */ + if (lconfig->hc_controladdr[0] == '\0') { + strlcpy(lconfig->hc_controladdr, depth0_control, + sizeof(lconfig->hc_controladdr)); + } + if (lconfig->hc_pidfile[0] == '\0') { + strlcpy(lconfig->hc_pidfile, depth0_pidfile, + sizeof(lconfig->hc_pidfile)); + } + if (!TAILQ_EMPTY(&depth0_listen)) + TAILQ_CONCAT(&lconfig->hc_listen, &depth0_listen, hl_next); + if (TAILQ_EMPTY(&lconfig->hc_listen)) { + struct hastd_listen *lst; + + if (family_supported(AF_INET)) { + lst = calloc(1, sizeof(*lst)); + if (lst == NULL) { + pjdlog_error("Unable to allocate memory for listen address."); + yy_config_free(lconfig); + if (exitonerror) + exit(EX_TEMPFAIL); + return (NULL); + } + (void)strlcpy(lst->hl_addr, depth0_listen_tcp4, + sizeof(lst->hl_addr)); + TAILQ_INSERT_TAIL(&lconfig->hc_listen, lst, hl_next); + } else { + pjdlog_debug(1, + "No IPv4 support in the kernel, not listening on IPv4 address."); + } + if (family_supported(AF_INET6)) { + lst = calloc(1, sizeof(*lst)); + if (lst == NULL) { + pjdlog_error("Unable to allocate memory for listen address."); + yy_config_free(lconfig); + if (exitonerror) + exit(EX_TEMPFAIL); + return (NULL); + } + (void)strlcpy(lst->hl_addr, depth0_listen_tcp6, + sizeof(lst->hl_addr)); + TAILQ_INSERT_TAIL(&lconfig->hc_listen, lst, hl_next); + } else { + pjdlog_debug(1, + "No IPv6 support in the kernel, not listening on IPv6 address."); + } + if (TAILQ_EMPTY(&lconfig->hc_listen)) { + pjdlog_error("No address to listen on."); + yy_config_free(lconfig); + if (exitonerror) + exit(EX_TEMPFAIL); + return (NULL); + } + } + TAILQ_FOREACH(curres, &lconfig->hc_resources, hr_next) { + PJDLOG_ASSERT(curres->hr_provname[0] != '\0'); + PJDLOG_ASSERT(curres->hr_localpath[0] != '\0'); + PJDLOG_ASSERT(curres->hr_remoteaddr[0] != '\0'); + + if (curres->hr_replication == -1) { + /* + * Replication is not set at resource-level. + * Use global or default setting. + */ + curres->hr_replication = depth0_replication; + } + if (curres->hr_replication == HAST_REPLICATION_MEMSYNC) { + pjdlog_warning("Replication mode \"%s\" is not implemented, falling back to \"%s\".", + "memsync", "fullsync"); + curres->hr_replication = HAST_REPLICATION_FULLSYNC; + } + if (curres->hr_checksum == -1) { + /* + * Checksum is not set at resource-level. + * Use global or default setting. + */ + curres->hr_checksum = depth0_checksum; + } + if (curres->hr_compression == -1) { + /* + * Compression is not set at resource-level. + * Use global or default setting. + */ + curres->hr_compression = depth0_compression; + } + if (curres->hr_timeout == -1) { + /* + * Timeout is not set at resource-level. + * Use global or default setting. + */ + curres->hr_timeout = depth0_timeout; + } + if (curres->hr_exec[0] == '\0') { + /* + * Exec is not set at resource-level. + * Use global or default setting. + */ + strlcpy(curres->hr_exec, depth0_exec, + sizeof(curres->hr_exec)); + } + if (curres->hr_metaflush == -1) { + /* + * Metaflush is not set at resource-level. + * Use global or default setting. + */ + curres->hr_metaflush = depth0_metaflush; + } + } + + return (lconfig); +} + +void +yy_config_free(struct hastd_config *config) +{ + struct hastd_listen *lst; + struct hast_resource *res; + + while ((lst = TAILQ_FIRST(&depth0_listen)) != NULL) { + TAILQ_REMOVE(&depth0_listen, lst, hl_next); + free(lst); + } + while ((lst = TAILQ_FIRST(&config->hc_listen)) != NULL) { + TAILQ_REMOVE(&config->hc_listen, lst, hl_next); + free(lst); + } + while ((res = TAILQ_FIRST(&config->hc_resources)) != NULL) { + TAILQ_REMOVE(&config->hc_resources, res, hr_next); + free(res); + } + free(config); +} diff --git a/usr.bin/ar/acpyacc.y b/usr.bin/ar/acpyacc.y index 99a23c755c33..5d15e8db5691 100644 --- a/usr.bin/ar/acpyacc.y +++ b/usr.bin/ar/acpyacc.y @@ -54,7 +54,6 @@ struct list { extern int yylex(void); -extern int yyparse(void); static void yyerror(const char *); static void arscp_addlib(char *archive, struct list *list); diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y index 55df7b33ac31..f7425f24628d 100644 --- a/usr.bin/bc/bc.y +++ b/usr.bin/bc/bc.y @@ -69,7 +69,6 @@ struct tree { ssize_t index; }; -int yyparse(void); int yywrap(void); int fileindex; diff --git a/usr.bin/find/getdate.y b/usr.bin/find/getdate.y index 81a9c47735e5..16ffb6eeff78 100644 --- a/usr.bin/find/getdate.y +++ b/usr.bin/find/getdate.y @@ -60,11 +60,9 @@ __FBSDID("$FreeBSD$"); #include <time.h> -#define yyparse getdate_yyparse #define yylex getdate_yylex #define yyerror getdate_yyerror -static int yyparse(void); static int yylex(void); static int yyerror(const char *); diff --git a/usr.bin/m4/parser.y b/usr.bin/m4/parser.y index 21243bbc96b4..14959738bdff 100644 --- a/usr.bin/m4/parser.y +++ b/usr.bin/m4/parser.y @@ -23,7 +23,6 @@ extern int32_t end_result; extern int yylex(void); extern int yyerror(const char *); -extern int yyparse(void); %} %token NUMBER %token ERROR diff --git a/usr.bin/mkcsmapper/ldef.h b/usr.bin/mkcsmapper/ldef.h index d0adf9a38b17..70c31225d9a9 100644 --- a/usr.bin/mkcsmapper/ldef.h +++ b/usr.bin/mkcsmapper/ldef.h @@ -39,4 +39,3 @@ extern int debug; extern int line_number; extern int yyerror(const char *); extern int yylex(void); -extern int yyparse(void); diff --git a/usr.bin/mklocale/extern.h b/usr.bin/mklocale/extern.h index c5b70802928d..60268cc90851 100644 --- a/usr.bin/mklocale/extern.h +++ b/usr.bin/mklocale/extern.h @@ -33,4 +33,3 @@ */ int yylex(void); -int yyparse(void); diff --git a/usr.sbin/bluetooth/bthidd/parser.y b/usr.sbin/bluetooth/bthidd/parser.y index ca49059a035b..50468f4e03a8 100644 --- a/usr.sbin/bluetooth/bthidd/parser.y +++ b/usr.sbin/bluetooth/bthidd/parser.y @@ -39,6 +39,7 @@ #include <errno.h> #include <limits.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> #include <usbhid.h> @@ -61,7 +62,6 @@ #include "bthid_config.h" - int yyparse (void); int yylex (void); void yyerror (char const *); static int32_t check_hid_device(hid_device_p hid_device); diff --git a/usr.sbin/bluetooth/hcsecd/parser.y b/usr.sbin/bluetooth/hcsecd/parser.y index 385bff257b3a..ec91c484cae2 100644 --- a/usr.sbin/bluetooth/hcsecd/parser.y +++ b/usr.sbin/bluetooth/hcsecd/parser.y @@ -36,6 +36,7 @@ #include <errno.h> #include <limits.h> #include <stdio.h> +#include <stdlib.h> #include <stdarg.h> #include <string.h> #include <syslog.h> diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index 6d66167ece10..f275749c8256 100644 --- a/usr.sbin/config/config.h +++ b/usr.sbin/config/config.h @@ -171,7 +171,6 @@ char *path(const char *); char *raisestr(char *); void remember(const char *); void moveifchanged(const char *, const char *); -int yyparse(void); int yylex(void); void options(void); void makefile(void); diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index 28d4f8abe466..14061c2081c6 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -91,6 +91,7 @@ static void usage(void); static void cleanheaders(char *); static void kernconfdump(const char *); static void checkversion(void); +extern int yyparse(void); struct hdr_list { char *h_name; diff --git a/usr.sbin/fifolog/lib/getdate.y b/usr.sbin/fifolog/lib/getdate.y index 8e63e8112993..53a515c4d17e 100644 --- a/usr.sbin/fifolog/lib/getdate.y +++ b/usr.sbin/fifolog/lib/getdate.y @@ -24,11 +24,9 @@ #include "libfifolog.h" -#define yyparse getdate_yyparse #define yylex getdate_yylex #define yyerror getdate_yyerror -static int yyparse(void); static int yylex(void); static int yyerror(const char *); diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c index 16f509568797..7a7917d2a5cf 100644 --- a/usr.sbin/jail/config.c +++ b/usr.sbin/jail/config.c @@ -52,6 +52,8 @@ struct ipspec { extern FILE *yyin; extern int yynerrs; +extern int yyparse(void); + struct cfjails cfjails = TAILQ_HEAD_INITIALIZER(cfjails); static void free_param(struct cfparams *pp, struct cfparam *p); diff --git a/usr.sbin/jail/jailp.h b/usr.sbin/jail/jailp.h index 4bf7929252ef..31a2abace012 100644 --- a/usr.sbin/jail/jailp.h +++ b/usr.sbin/jail/jailp.h @@ -222,7 +222,6 @@ extern void requeue(struct cfjail *j, struct cfjails *queue); extern void yyerror(const char *); extern int yylex(void); -extern int yyparse(void); extern struct cfjails cfjails; extern struct cfjails ready; |