From 9f1114571ca8f24265de34c6150cc869ccbab701 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Aug 05 2021 04:43:13 +0000 Subject: drop deprecated hsnet_inet_ntoa from HsNet.h --- diff --git a/ghc-network.spec b/ghc-network.spec index ed2a29c..5058b20 100644 --- a/ghc-network.spec +++ b/ghc-network.spec @@ -9,7 +9,7 @@ Name: ghc-%{pkg_name} Version: 3.1.1.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Low-level networking interface License: BSD @@ -17,6 +17,7 @@ Url: https://hackage.haskell.org/package/%{pkg_name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz # End cabal-rpm sources +Patch0: network-3.1-unused-hsnet_inet_ntoa.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel @@ -93,6 +94,7 @@ This package provides the Haskell %{pkg_name} profiling library. # Begin cabal-rpm setup: %setup -q -n %{pkgver} # End cabal-rpm setup +%patch0 -p1 -b .orig %build @@ -135,6 +137,9 @@ This package provides the Haskell %{pkg_name} profiling library. %changelog +* Thu Aug 5 2021 Jens Petersen - 3.1.1.1-6 +- drop deprecated hsnet_inet_ntoa from HsNet.h + * Thu Jul 22 2021 Fedora Release Engineering - 3.1.1.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/network-3.1-unused-hsnet_inet_ntoa.patch b/network-3.1-unused-hsnet_inet_ntoa.patch new file mode 100644 index 0000000..9f0a0c6 --- /dev/null +++ b/network-3.1-unused-hsnet_inet_ntoa.patch @@ -0,0 +1,27 @@ +--- network-3.1.1.1/include/HsNet.h~ 2001-09-09 09:46:40.000000000 +0800 ++++ network-3.1.1.1/include/HsNet.h 2021-06-24 17:25:39.287773682 +0800 +@@ -86,24 +86,6 @@ + recvFd(int sock); + #endif /* _WIN32 */ + +-INLINE char * +-hsnet_inet_ntoa( +-#if defined(_WIN32) +- u_long addr +-#elif defined(HAVE_IN_ADDR_T) +- in_addr_t addr +-#elif defined(HAVE_INTTYPES_H) +- u_int32_t addr +-#else +- unsigned long addr +-#endif +- ) +-{ +- struct in_addr a; +- a.s_addr = addr; +- return inet_ntoa(a); +-} +- + INLINE int + hsnet_getnameinfo(const struct sockaddr* a,socklen_t b, char* c, + # if defined(_WIN32)