aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMakefile.PL6
-rw-r--r--NEWS1
-rw-r--r--URPM.xs2
3 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL
index a6e2492..d3b72e6 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -54,7 +54,11 @@ foreach (qw(
print $FH "\n#endif\n";
close($FH);
-my $ccflags = join(' ', '-Wall -Wextra -fno-strict-aliasing', $cfg{cflags}, "-DRPM_VERSON=$cfg{modversion}");
+my $workaround;
+if (-e '/etc/redhat-release' && $cfg{modversion} =~ /4.11/) {
+ $workaround = '-DPATCHED_RH';
+}
+my $ccflags = join(' ', '-Wall -Wextra -fno-strict-aliasing', $cfg{cflags}, "-DRPM_VERSON=$cfg{modversion}", $workaround);
print "Found RPM version $cfg{modversion} (compiling with flags: $ccflags)\n";
diff --git a/NEWS b/NEWS
index 5d775cb..c23f82a 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
- CPAN testers:
o display rpm version in flags
o workaround CPAN testers that run FreeBSD (RT#131162)
+ o Workaround CPAN testers that run CentOS 7 (RT#131163)
Version 5.23.2 - 30 December 2019
diff --git a/URPM.xs b/URPM.xs
index efdacbd..465ed14 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -121,11 +121,13 @@ typedef struct s_Package* URPM__Package;
#ifdef RPM4_11_0
#ifndef RPM4_12_0
+#ifndef PATCHED_RH
#define RPMTAG_RECOMMENDNAME RPMTAG_SUGGESTSNAME
#define RPMTAG_RECOMMENDFLAGS RPMTAG_SUGGESTSFLAGS
#define RPMTAG_RECOMMENDVERSION RPMTAG_SUGGESTSVERSION
#endif
#endif
+#endif
static ssize_t write_nocheck(int fd, const void *buf, size_t count) {
return write(fd, buf, count);