diff --git a/lsof-Configure.patch b/lsof-Configure.patch new file mode 100644 index 0000000..96b5ceb --- /dev/null +++ b/lsof-Configure.patch @@ -0,0 +1,27 @@ +Avoid C89isms during configure checks. + +Submitted upstream: + +diff --git a/Configure b/Configure +index d8adfda3e47f87df..ed1e1d60840b3852 100755 +--- a/Configure ++++ b/Configure +@@ -2189,7 +2189,7 @@ LOCKF_OWNER4 + #include + #include + #include +-main() { ++int main() { + struct xtcpcb pcb; pcb.t_maxseg = 0; + } + .LSOF_END_HERE_DOC4 +@@ -2755,7 +2755,8 @@ struct xtcpcb pcb; pcb.t_maxseg = 0; + rm -f ${LSOF_TMPC}.* + cat > $LSOF_TMPC.c << .LSOF_END_HERE_DOC1 + #include +-main() { ++#include ++int main() { + #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) + printf("-DGLIBCV=%d\n",__GLIBC__*100+__GLIBC_MINOR__); + #elif defined(__GLIBC__) diff --git a/lsof.spec b/lsof.spec index c589719..1a53776 100644 --- a/lsof.spec +++ b/lsof.spec @@ -1,7 +1,7 @@ Summary: A utility which lists open files on a Linux/UNIX system Name: lsof Version: 4.96.3 -Release: 1%{?dist} +Release: 2%{?dist} # Sendmail .. lib/snpf.c # LGPLv2+ .. lib/regex.c, regex.h License: zlib and Sendmail and LGPLv2+ @@ -19,6 +19,7 @@ Source1: upstream2downstream.sh # BZ#1260300 - move lsof man page to section 1 Patch0: lsof-man-page-section.patch +Patch1: lsof-Configure.patch BuildRequires: gcc BuildRequires: libselinux-devel @@ -33,6 +34,7 @@ about files that are open by the processes running on a UNIX system. %prep %setup -q -n %{lsofrh} %patch0 -p1 -b .man-page-section +%patch1 -p1 %build ./Configure -n linux @@ -52,6 +54,9 @@ install -p -m 0644 lsof.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/lsof.1 %{_mandir}/man*/* %changelog +* Mon Nov 21 2022 Florian Weimer - 4.96.3-2 +- Fix C89isms in Configure + * Tue Sep 20 2022 Jan Rybar - 4.96.3-1 - rebase to 4.96.3