From 0aa8e0a99c5036289dad865aa9d94fa3f4053dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 12 Jan 2018 07:19:17 +0100 Subject: [PATCH] Fix compiler warnings --- Socket-2.025-rt124044.patch | 29 +++++++++++++++++++++++++++++ perl-Socket.spec | 8 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Socket-2.025-rt124044.patch diff --git a/Socket-2.025-rt124044.patch b/Socket-2.025-rt124044.patch new file mode 100644 index 0000000..fa70b1d --- /dev/null +++ b/Socket-2.025-rt124044.patch @@ -0,0 +1,29 @@ +=== modified file 'Makefile.PL' +--- Makefile.PL 2018-01-08 20:07:01 +0000 ++++ Makefile.PL 2018-01-11 22:47:53 +0000 +@@ -80,7 +80,7 @@ + # -Dfoo func() $Config{key} + HAS_GETADDRINFO => [ "getaddrinfo", "d_getaddrinfo" ], + HAS_GETNAMEINFO => [ "getnameinfo", "d_getnameinfo" ], +- HAS_GAI_STRERROR => [ "gai_strerror" ], ++ HAS_GAI_STRERROR => [ "gai_strerror", "d_gai_strerror" ], + HAS_INET_ATON => [ "inet_aton", "d_inetaton" ], + HAS_INETNTOP => [ "inet_ntop", "d_inetntop" ], + HAS_INETPTON => [ "inet_pton", "d_inetpton" ], + +=== modified file 'Socket.xs' +--- Socket.xs 2018-01-08 22:43:12 +0000 ++++ Socket.xs 2018-01-11 22:39:17 +0000 +@@ -826,8 +826,9 @@ + sun_ad.sun_family = AF_UNIX; + pathname_pv = SvPV(pathname,len); + if (len > sizeof(sun_ad.sun_path)) { +- warn("Path length (%d) is longer than maximum supported length" +- " (%d) and will be truncated", len, sizeof(sun_ad.sun_path)); ++ warn("Path length (%" UVuf ") is longer than maximum supported length" ++ " (%" UVuf ") and will be truncated", ++ (UV)len, (UV)sizeof(sun_ad.sun_path)); + len = sizeof(sun_ad.sun_path); + } + # ifdef OS2 /* Name should start with \socket\ and contain backslashes! */ + diff --git a/perl-Socket.spec b/perl-Socket.spec index 029949e..1a2140b 100644 --- a/perl-Socket.spec +++ b/perl-Socket.spec @@ -1,11 +1,13 @@ Name: perl-Socket Epoch: 4 Version: 2.025 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Networking constants and support functions License: GPL+ or Artistic URL: http://search.cpan.org/dist/Socket/ Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/Socket-%{version}.tar.gz +# Fix compiler warnings, CPAN RT#124044 +Patch0: Socket-2.025-rt124044.patch BuildRequires: findutils BuildRequires: gcc BuildRequires: make @@ -42,6 +44,7 @@ human-readable and native binary forms, and for hostname resolver operations. %prep %setup -q -n Socket-%{version} +%patch0 -p0 %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="$RPM_OPT_FLAGS" @@ -63,6 +66,9 @@ make test %{_mandir}/man3/* %changelog +* Fri Jan 12 2018 Petr Pisar - 4:2.025-2 +- Fix compiler warnings (CPAN RT#124044) + * Wed Jan 10 2018 Petr Pisar - 4:2.025-1 - 2.025 bump