Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=110117a426f... Commit: 110117a426f1edc0c3110a7776f10db186bc6f7d Parent: 4a98c699227bb9cea72293be54fccceb2111ab38 Author: Andrew Price anprice@redhat.com AuthorDate: Wed Nov 14 12:22:03 2012 +0000 Committer: Andrew Price anprice@redhat.com CommitterDate: Wed Nov 14 12:22:03 2012 +0000
libgfs2: Fix build with bison 2.6
Bison 2.6 adds a prototype for yyparse in the generated parser.h, creating a circular dependency between lexer.{c.h} and parser.h.
This patch adds a typedef which breaks the cycle and allows libgfs2 to build with bison 2.6 again.
It also fixes a race between libgfs2.la and gfs2l by clarifying gfs2l's dependency on libgfs2.la.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/libgfs2/Makefile.am | 2 +- gfs2/libgfs2/parser.y | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/gfs2/libgfs2/Makefile.am b/gfs2/libgfs2/Makefile.am index 9c4e96b..b57f6d9 100644 --- a/gfs2/libgfs2/Makefile.am +++ b/gfs2/libgfs2/Makefile.am @@ -23,7 +23,7 @@ libgfs2_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 \
gfs2l_SOURCES = gfs2l.c gfs2l_CPPFLAGS = -I$(top_srcdir)/gfs2/include -gfs2l_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la +gfs2l_LDADD = libgfs2.la
# Autotools can't handle header files output by flex so we have to generate it manually lexer.h: lexer.l diff --git a/gfs2/libgfs2/parser.y b/gfs2/libgfs2/parser.y index 084d15e..0321d74 100644 --- a/gfs2/libgfs2/parser.y +++ b/gfs2/libgfs2/parser.y @@ -1,3 +1,7 @@ +%code requires { +/* Required to break a circular dependency introduced with bison 2.6 */ +typedef void* yyscan_t; +} %code top { #include <errno.h> #include "lang.h"
cluster-commits@lists.fedorahosted.org