Fix rpminspect failures

Resolves: RHEL-70718

Signed-off-by: Kamal Heib <kheib@redhat.com>
This commit is contained in:
Kamal Heib 2024-12-11 01:45:41 -05:00
parent cd2b622364
commit fd48b88afe
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From 50932456daa060e0e68daf2917d55fe36ee12185 Mon Sep 17 00:00:00 2001
From: Kamal Heib <kheib@redhat.com>
Date: Wed, 11 Dec 2024 01:41:59 -0500
Subject: [PATCH] Replace inet_addr with inet_pton
Signed-off-by: Kamal Heib <kheib@redhat.com>
---
src/mca/ptl/base/ptl_base_fns.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mca/ptl/base/ptl_base_fns.c b/src/mca/ptl/base/ptl_base_fns.c
index 65f9531014d4..4f2d8116ac6b 100644
--- a/src/mca/ptl/base/ptl_base_fns.c
+++ b/src/mca/ptl/base/ptl_base_fns.c
@@ -438,6 +438,7 @@ pmix_status_t pmix_ptl_base_setup_connection(char *uri, struct sockaddr_storage
size_t *len)
{
char *p = NULL, *p2, *host;
+ struct in_addr addr;
struct sockaddr_in *in;
struct sockaddr_in6 *in6;
@@ -466,7 +467,8 @@ pmix_status_t pmix_ptl_base_setup_connection(char *uri, struct sockaddr_storage
/* load the address */
in = (struct sockaddr_in *) connection;
in->sin_family = AF_INET;
- in->sin_addr.s_addr = inet_addr(host);
+ inet_pton(AF_INET, host, &addr);
+ in->sin_addr.s_addr = addr.s_addr;
if (in->sin_addr.s_addr == INADDR_NONE) {
free(p);
PMIX_ERROR_LOG(PMIX_ERR_BAD_PARAM);
--
2.47.0

View File

@ -1,6 +1,6 @@
Name: pmix
Version: 4.2.8
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Process Management Interface Exascale (PMIx)
License: BSD-3-Clause
URL: https://pmix.org/
@ -8,6 +8,7 @@ Source0: https://github.com/openpmix/openpmix/releases/download/v%{versio
# file missing from release
Source1: construct_event_strings.py
Patch1: https://github.com/openpmix/openpmix/pull/3245.patch
Patch2: Replace-inet_addr-with-inet_pton.patch
BuildRequires: autoconf
BuildRequires: automake
@ -70,6 +71,9 @@ find src -name \*.l -print -exec touch --no-create {} \;
%build
export CFLAGS="%{build_cflags} -Wno-unused-function -Wno-attributes"
%ifarch x86_64
export CPPFLAGS="$CPPFLAGS -fcf-protection"
%endif
%configure \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir}/%{name} \
@ -133,6 +137,10 @@ mv test/.libs/pmix_test %{buildroot}%{_datadir}/%{name}/test/pmix_test
%{_bindir}/*
%changelog
* Wed Dec 11 2024 Kamal Heib <kheib@redhat.com> - 4.2.8-6
- Fix rpminspect failures
Resolves: RHEL-70718
* Wed Dec 11 2024 Kamal Heib <kheib@redhat.com> - 4.2.8-5
- Add pmix_test
Resolves: RHEL-70718