diff --git a/src/serial/sball.c b/src/serial/sball.c index cfbbdd1..aa33114 100644 --- a/src/serial/sball.c +++ b/src/serial/sball.c @@ -60,7 +60,7 @@ struct event { }; static struct event *ev_free_list; -int evpool_size; +int sball_evpool_size =0; static struct event *alloc_event(void); static void free_event(struct event *ev); @@ -662,16 +662,16 @@ static struct event *alloc_event(void) ev_free_list = ev->next; } else { ev = malloc(sizeof *ev); - evpool_size++; + sball_evpool_size++; } return ev; } static void free_event(struct event *ev) { - if(evpool_size > 512) { + if(sball_evpool_size > 512) { free(ev); - evpool_size--; + sball_evpool_size--; } else { ev->next = ev_free_list; ev_free_list = ev; diff --git a/src/spnavd.c b/src/spnavd.c index c51b120..3c7278a 100644 --- a/src/spnavd.c +++ b/src/spnavd.c @@ -48,6 +48,9 @@ static char *fix_path(char *str); static char *cfgfile = DEF_CFGFILE; static char *logfile = DEF_LOGFILE; +struct cfg cfg; +int verbose; + int main(int argc, char **argv) { int i, pid, ret, become_daemon = 1; diff --git a/src/spnavd.h b/src/spnavd.h index fa0a916..99672af 100644 --- a/src/spnavd.h +++ b/src/spnavd.h @@ -47,9 +47,7 @@ along with this program. If not, see . #endif - - -struct cfg cfg; -int verbose; +extern struct cfg cfg; +extern int verbose; #endif /* SPNAVD_H_ */