summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 13d4293..08ba780 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -857,8 +857,9 @@ PHP_FUNCTION(rpmgetsymlink)
fi = rpmfiNewArchiveReader(gzdi, files, RPMFI_ITER_READ_ARCHIVE);
rc = rpmfiFindFN(fi, name);
+ rpmfiSetFX(fi, rc); /* return value not reliable on librpm < 4.17 */
if (rc < 0
- || rpmfiSetFX(fi, rc) < 0
+ || rpmfiFX(fi) != rc
|| (link = rpmfiFLink(fi)) == NULL) {
RETVAL_NULL();
} else {