From 1602a6531da2f9a0c767c6a6f9342c60f7ed0300 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 19 Dec 2023 19:42:18 -0500 Subject: [PATCH] Fix for https://fedoraproject.org/wiki/Changes/PortingToModernC configure uses AC_SYS_LARGEFILE to determine whether to define _FILE_OFFSET_BITS=64, in which case fseeko64 and lseek64 are used in place of fseeko and lseek. However, this is technically backwards, as _FILE_OFFSET_BITS=64 is supposed to be used to override fseeko etc. with 64-bit variants even on 32-bit systems, and the explicit 64 variants are correctly guarded by _LARGEFILE64_SOURCE. This results in implicit declarations in 32-bit systems (i686) which recently became errors. --- libcdio.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcdio.spec b/libcdio.spec index be9c68d..7544d87 100644 --- a/libcdio.spec +++ b/libcdio.spec @@ -41,6 +41,10 @@ This package contains header files and libraries for %{name}. iconv -f ISO88591 -t utf-8 -o THANKS.utf8 THANKS && mv THANKS.utf8 THANKS %build +%ifarch %{ix86} +# avoid implicit declaration of fseeko64, lseek64 +export CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" +%endif %configure \ --disable-vcd-info \ --disable-dependency-tracking \