summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2019-02-15 18:04:29 +0000
committerVincent Sanders <vince@kyllikki.org>2019-02-15 18:04:29 +0000
commit9298fea93f101a417bbd15a879f319fcdcf41cf0 (patch)
tree4e716569e3c0ae8b927c53fefa13ed0da71f9aaf
parentb39750cd36da48996a3ae429fb5c60df5e3a016b (diff)
downloadnsgenbind-9298fea93f101a417bbd15a879f319fcdcf41cf0.tar.gz
nsgenbind-9298fea93f101a417bbd15a879f319fcdcf41cf0.tar.bz2
Global variable errtxt is defined in two separate files.
This is a minor C standard conformance issue, and causes the build to fail with a duplicate symbol error when CFLAGS includes "-fno-common". The following patch fixes the issue by making the variables static.
-rw-r--r--src/nsgenbind-parser.y2
-rw-r--r--src/webidl-parser.y2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nsgenbind-parser.y b/src/nsgenbind-parser.y
index d73401e..683c15b 100644
--- a/src/nsgenbind-parser.y
+++ b/src/nsgenbind-parser.y
@@ -91,7 +91,7 @@ typedef struct YYLTYPE {
#include "webidl-ast.h"
#include "nsgenbind-ast.h"
-char *errtxt;
+static char *errtxt;
static void nsgenbind_error(YYLTYPE *locp,
char *filename,
diff --git a/src/webidl-parser.y b/src/webidl-parser.y
index 0e46b17..5fb991d 100644
--- a/src/webidl-parser.y
+++ b/src/webidl-parser.y
@@ -32,7 +32,7 @@
#include "webidl-ast.h"
-char *errtxt;
+static char *errtxt;
static void
webidl_error(YYLTYPE *locp, struct webidl_node **winbind_ast, const char *str)