Unverified Commit fd21ee24 authored by Eli Schwartz via pacman-contrib's avatar Eli Schwartz via pacman-contrib Committed by Daniel M. Capella
Browse files

pactree: fix compilation with pacman 6



In "add front-end provided context to callbacks", libalpm gained a new
argument to callbacks which we don't use and is only needed by some
frontends wishing to do stuff with the callback state. NULL it and move
on with life, just like pacman itself did.
Signed-off-by: default avatarEli Schwartz <eschwartz@archlinux.org>
Signed-off-by: default avatarDaniel M. Capella <polyzen@archlinux.org>
parent 62190b1b
......@@ -135,8 +135,10 @@ static const char *dbpath = DBPATH;
static const char *configfile = CONFFILE;
static const char *gpgdir = GPGDIR;
void cb_log(alpm_loglevel_t level, const char *fmt, va_list args)
void cb_log(void *ctx, alpm_loglevel_t level, const char *fmt, va_list args)
{
(void)ctx;
switch(level) {
case ALPM_LOG_ERROR:
fprintf(stderr, "%s%s%s", color->error, "error: ",
......@@ -621,7 +623,7 @@ int main(int argc, char *argv[])
}
if(debug) {
alpm_option_set_logcb(handle, cb_log);
alpm_option_set_logcb(handle, cb_log, NULL);
}
/* no need to fail on error here */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment