aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-11 09:52:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-11 09:52:40 +0000
commite2ed0dbd3de35c543c66a4e14b1de0875e55b979 (patch)
treec22a74b10fa3f4dc50ce33c9dd9ef689307fab8b /URPM.xs
parentd9f55ea22b84795b339b6c8456cea9e44de50d1f (diff)
downloadperl-URPM-e2ed0dbd3de35c543c66a4e14b1de0875e55b979.tar
perl-URPM-e2ed0dbd3de35c543c66a4e14b1de0875e55b979.tar.gz
perl-URPM-e2ed0dbd3de35c543c66a4e14b1de0875e55b979.tar.bz2
perl-URPM-e2ed0dbd3de35c543c66a4e14b1de0875e55b979.tar.xz
perl-URPM-e2ed0dbd3de35c543c66a4e14b1de0875e55b979.zip
adapt to rpm.org HEAD change from 7 Dec 2007
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs15
1 files changed, 12 insertions, 3 deletions
diff --git a/URPM.xs b/URPM.xs
index 062ac02..596dfbf 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -133,12 +133,17 @@ static const void* unused_variable(const void *p) {
}
static int rpmError_callback_data;
+#ifdef RPM_ORG
+int rpmError_callback() {
+ write_nocheck(rpmError_callback_data, rpmlogMessage(), strlen(rpmlogMessage()));
+ return RPMLOG_DEFAULT;
+}
+#else
void rpmError_callback() {
-#ifndef RPM_ORG
if (rpmErrorCode() != RPMERR_UNLINK && rpmErrorCode() != RPMERR_RMDIR)
-#endif
write_nocheck(rpmError_callback_data, rpmlogMessage(), strlen(rpmlogMessage()));
}
+#endif
static int rpm_codeset_is_utf8 = 0;
@@ -3885,6 +3890,10 @@ rpmErrorWriteTo(fd)
int fd
CODE:
rpmError_callback_data = fd;
- rpmlogSetCallback(rpmError_callback);
+ rpmlogSetCallback(rpmError_callback,
+#ifdef RPM_ORG
+ NULL
+#endif
+ );
/* vim:set ts=8 sts=2 sw=2: */