Fix C89isms in Configure
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
f130d9e01c
commit
9b1730c7b0
27
lsof-Configure.patch
Normal file
27
lsof-Configure.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
Avoid C89isms during configure checks.
|
||||||
|
|
||||||
|
Submitted upstream: <https://github.com/lsof-org/lsof/pull/265>
|
||||||
|
|
||||||
|
diff --git a/Configure b/Configure
|
||||||
|
index d8adfda3e47f87df..ed1e1d60840b3852 100755
|
||||||
|
--- a/Configure
|
||||||
|
+++ b/Configure
|
||||||
|
@@ -2189,7 +2189,7 @@ LOCKF_OWNER4
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <netinet/in_pcb.h>
|
||||||
|
#include <netinet/tcp_var.h>
|
||||||
|
-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 <features.h>
|
||||||
|
-main() {
|
||||||
|
+#include <stdio.h>
|
||||||
|
+int main() {
|
||||||
|
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
|
||||||
|
printf("-DGLIBCV=%d\n",__GLIBC__*100+__GLIBC_MINOR__);
|
||||||
|
#elif defined(__GLIBC__)
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A utility which lists open files on a Linux/UNIX system
|
Summary: A utility which lists open files on a Linux/UNIX system
|
||||||
Name: lsof
|
Name: lsof
|
||||||
Version: 4.96.3
|
Version: 4.96.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
# Sendmail .. lib/snpf.c
|
# Sendmail .. lib/snpf.c
|
||||||
# LGPLv2+ .. lib/regex.c, regex.h
|
# LGPLv2+ .. lib/regex.c, regex.h
|
||||||
License: zlib and Sendmail and LGPLv2+
|
License: zlib and Sendmail and LGPLv2+
|
||||||
@ -19,6 +19,7 @@ Source1: upstream2downstream.sh
|
|||||||
|
|
||||||
# BZ#1260300 - move lsof man page to section 1
|
# BZ#1260300 - move lsof man page to section 1
|
||||||
Patch0: lsof-man-page-section.patch
|
Patch0: lsof-man-page-section.patch
|
||||||
|
Patch1: lsof-Configure.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
@ -33,6 +34,7 @@ about files that are open by the processes running on a UNIX system.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{lsofrh}
|
%setup -q -n %{lsofrh}
|
||||||
%patch0 -p1 -b .man-page-section
|
%patch0 -p1 -b .man-page-section
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./Configure -n linux
|
./Configure -n linux
|
||||||
@ -52,6 +54,9 @@ install -p -m 0644 lsof.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/lsof.1
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 21 2022 Florian Weimer <fweimer@redhat.com> - 4.96.3-2
|
||||||
|
- Fix C89isms in Configure
|
||||||
|
|
||||||
* Tue Sep 20 2022 Jan Rybar <jrybar@redhat.com> - 4.96.3-1
|
* Tue Sep 20 2022 Jan Rybar <jrybar@redhat.com> - 4.96.3-1
|
||||||
- rebase to 4.96.3
|
- rebase to 4.96.3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user