From f2a7ca62916698b2903b68e0b5f81de52dc5df05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 24 Jan 2023 09:24:53 +0100 Subject: [PATCH] Fix undefined printf() in configure check https://fedoraproject.org/wiki/Changes/PortingToModernC Upstream PR: https://github.com/dajobe/rasqal/pull/11 --- define-printf.patch | 23 +++++++++++++++++++++++ rasqal.spec | 10 +++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 define-printf.patch diff --git a/define-printf.patch b/define-printf.patch new file mode 100644 index 0000000..d787e78 --- /dev/null +++ b/define-printf.patch @@ -0,0 +1,23 @@ +diff -ruN rasqal-0.9.33.orig/configure rasqal-0.9.33/configure +--- rasqal-0.9.33.orig/configure 2023-01-23 13:14:38.861781072 +0100 ++++ rasqal-0.9.33/configure 2023-01-23 16:57:03.874250005 +0100 +@@ -13712,6 +13712,7 @@ + $as_echo_n "checking whether __FUNCTION__ is available... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++extern int printf(const char *); + int main() { printf(__FUNCTION__); } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +diff -ruN rasqal-0.9.33.orig/configure.ac rasqal-0.9.33/configure.ac +--- rasqal-0.9.33.orig/configure.ac 2014-11-23 23:11:33.000000000 +0100 ++++ rasqal-0.9.33/configure.ac 2023-01-23 15:49:44.885025978 +0100 +@@ -312,7 +312,7 @@ + AC_C_BIGENDIAN + + AC_MSG_CHECKING(whether __FUNCTION__ is available) +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { printf(__FUNCTION__); }])], ++AC_COMPILE_IFELSE([AC_LANG_SOURCE([extern int printf(const char *s); int main() { printf(__FUNCTION__); }])], + [AC_DEFINE([HAVE___FUNCTION__], [1], [Is __FUNCTION__ available]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) diff --git a/rasqal.spec b/rasqal.spec index 308fe85..c12dc1f 100644 --- a/rasqal.spec +++ b/rasqal.spec @@ -1,6 +1,6 @@ Name: rasqal Version: 0.9.33 -Release: 22%{?dist} +Release: 23%{?dist} Summary: RDF Query Library License: LGPLv2+ or ASL 2.0 @@ -17,6 +17,9 @@ BuildRequires: libgcrypt-devel BuildRequires: perl(Pod::Usage) BuildRequires: perl(XML::DOM) +# Upstream PR: https://github.com/dajobe/rasqal/pull/11 +Patch1: define-printf.patch + %description Rasqal is a library providing full support for querying Resource Description Framework (RDF) including parsing query syntaxes, constructing @@ -32,6 +35,7 @@ Libraries, includes etc to develop with the Rasqal RDF query language library. %prep %setup -q +%patch1 -p1 -b .printf # hack to nuke rpaths %if "%{_libdir}" != "/usr/lib" @@ -93,6 +97,10 @@ fi %changelog +* Tue Jan 24 2023 Timm Bäder - 0.9.33-23 +- Fix undefined printf() in configure check. +- https://fedoraproject.org/wiki/Changes/PortingToModernC + * Fri Jan 20 2023 Fedora Release Engineering - 0.9.33-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild