From e2ea6ac11dbc8f9e5c30c746ae4bba13a9a4e91e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 11 Jan 2023 12:10:27 +0100 Subject: [PATCH] C99 compatibility fix Related to: --- byaccj-c99.patch | 17 +++++++++++++++++ byaccj.spec | 8 ++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 byaccj-c99.patch diff --git a/byaccj-c99.patch b/byaccj-c99.patch new file mode 100644 index 0000000..0fd17f9 --- /dev/null +++ b/byaccj-c99.patch @@ -0,0 +1,17 @@ +Include for the unlink function. This avoids an implicit +function declaration, increasing C99 compatibility. + +Submitted upstream: + +diff --git a/src/main.c b/src/main.c +index 54b5e05ba3aa2946..e4deacd47a3c0d34 100755 +--- a/src/main.c ++++ b/src/main.c +@@ -4,6 +4,7 @@ + + #ifndef __WIN32__ /*rwj -- make portable*/ + #include ++#include + #else + #include + #endif diff --git a/byaccj.spec b/byaccj.spec index 9ac0907..dbacb52 100644 --- a/byaccj.spec +++ b/byaccj.spec @@ -1,11 +1,12 @@ Summary: Parser Generator with Java Extension Name: byaccj Version: 1.15 -Release: 28%{?dist} +Release: 29%{?dist} License: Public Domain URL: http://byaccj.sourceforge.net/ Source0: http://sourceforge.net/projects/byaccj/files/byaccj/1.15/byaccj1.15_src.tar.gz +Patch0: byaccj-c99.patch BuildRequires: gcc BuildRequires: make @@ -23,7 +24,7 @@ generate Java source code, instead. So there finally is a YACC for Java now! %prep -%setup -q -n %{name}%{version} +%autosetup -p1 -n %{name}%{version} chmod -c -x src/* docs/* sed -i -e 's|-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4|$(LDFLAGS)|g' src/Makefile @@ -41,6 +42,9 @@ install -p -m 755 src/yacc %{buildroot}%{_bindir}/%{name} %{_bindir}/%{name} %changelog +* Wed Jan 11 2023 Florian Weimer - 1.15-29 +- C99 compatibility fix + * Wed Jul 20 2022 Fedora Release Engineering - 1.15-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild