diff --git a/raptor2-configure-c99.patch b/raptor2-configure-c99.patch new file mode 100644 index 0000000..23d9472 --- /dev/null +++ b/raptor2-configure-c99.patch @@ -0,0 +1,35 @@ +Include for printf in __FUNCTION__ check. Otherwise, the +check will fail with compilers which do not implement implicit +function declarations (a C feature that was removed in 1999 from the +language), no matter if the compiler supports FUNCTION or not. + +Submitted upstream: + +diff --git a/configure b/configure +index b0091892a210361d..08501ac8ed5e4fe1 100755 +--- a/configure ++++ b/configure +@@ -13747,6 +13747,8 @@ esac + $as_echo_n "checking whether __FUNCTION__ is available... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ ++#include + int main() { printf(__FUNCTION__); } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +diff --git a/configure.ac b/configure.ac +index 10ff870805b82e65..40a8548b6406866a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -312,7 +312,9 @@ AC_C_BIGENDIAN + AC_C_INLINE + + AC_MSG_CHECKING(whether __FUNCTION__ is available) +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { printf(__FUNCTION__); }])], ++AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ++#include ++int main() { printf(__FUNCTION__); }])], + [AC_DEFINE([HAVE___FUNCTION__], [1], [Is __FUNCTION__ available]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) diff --git a/raptor2.spec b/raptor2.spec index 4a37434..b500e4c 100644 --- a/raptor2.spec +++ b/raptor2.spec @@ -2,7 +2,7 @@ Summary: RDF Parser Toolkit for Redland Name: raptor2 Version: 2.0.15 -Release: 34%{?dist} +Release: 35%{?dist} License: GPLv2+ or LGPLv2+ or ASL 2.0 Source: http://download.librdf.org/source/raptor2-%{version}.tar.gz @@ -15,6 +15,7 @@ Patch1: 0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch Patch2: 0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch ## upstreamable patches +Patch3: raptor2-configure-c99.patch BuildRequires: make BuildRequires: gcc-c++ @@ -101,6 +102,9 @@ make check %changelog +* Thu Dec 8 2022 Florian Weimer - 2.0.15-35 +- Port configure script to C99 + * Mon Aug 01 2022 Frantisek Zatloukal - 2.0.15-34 - Rebuilt for ICU 71.1