You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.1 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gfs2-utils/gfs2-utils-0001-bison26.patch
# Copyright (C) 2013 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From 110117a426f1edc0c3110a7776f10db186bc6f7d Mon Sep 17 00:00:00 2001
From: Andrew Price <anprice@redhat.com>
Date: Wed, 14 Nov 2012 12:22:03 +0000
Subject: 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>
---
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"
--
cgit v0.9.1