summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/c')
-rw-r--r--perl-install/c/stuff.xs.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 8a2890f9e..94f19ac63 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -7,6 +7,7 @@ print '
#define dev_t dev_t
#include <ctype.h>
+#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
#include <fcntl.h>
@@ -454,7 +455,9 @@ $ENV{C_RPM} and print '
int
rpmReadConfigFiles()
CODE:
- RETVAL = rpmReadConfigFiles(NULL, NULL) == 0;
+ char *rpmrc = getenv("RPMRC_FILE");
+ if (rpmrc != NULL && !*rpmrc) rpmrc = NULL;
+ RETVAL = rpmReadConfigFiles(rpmrc, NULL) == 0;
OUTPUT:
RETVAL