cli: chase pkgconf_client_init changes

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
Ariadne Conill 2025-12-24 15:35:09 -08:00
parent c7d8ebc439
commit eab5f5da93
3 changed files with 27 additions and 3 deletions

View File

@ -33,6 +33,14 @@ static size_t maximum_package_count = 0;
static int maximum_traverse_depth = 2000;
static FILE *error_msgout = NULL;
static const char *
environ_lookup_handler(const pkgconf_client_t *client, const char *key)
{
(void) client;
return getenv(key);
}
static bool
error_handler(const char *msg, const pkgconf_client_t *client, void *data)
{
@ -285,7 +293,7 @@ main(int argc, char *argv[])
}
}
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL);
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL, environ_lookup_handler);
/* we have determined what features we want most likely. in some cases, we override later. */
pkgconf_client_set_flags(&pkg_client, want_client_flags);

View File

@ -19,6 +19,14 @@
#include "getopt_long.h"
#include "core.h"
static const char *
environ_lookup_handler(const pkgconf_client_t *client, const char *key)
{
(void) client;
return getenv(key);
}
static bool
error_handler(const char *msg, const pkgconf_client_t *client, void *data)
{
@ -411,7 +419,7 @@ main(int argc, char *argv[])
#endif
/* now, bring up the client. settings are preserved since the client is prealloced */
pkgconf_client_init(&state.pkg_client, error_handler, &state, state.personality, &state);
pkgconf_client_init(&state.pkg_client, error_handler, &state, state.personality, &state, environ_lookup_handler);
#ifndef PKGCONF_LITE
if (getenv("PKG_CONFIG_MSVC_SYNTAX") != NULL)

View File

@ -33,6 +33,14 @@ static size_t maximum_package_count = 0;
// static int maximum_traverse_depth = 2000;
static FILE *error_msgout = NULL;
static const char *
environ_lookup_handler(const pkgconf_client_t *client, const char *key)
{
(void) client;
return getenv(key);
}
static bool
error_handler(const char *msg, const pkgconf_client_t *client, void *data)
{
@ -263,7 +271,7 @@ main(int argc, char *argv[])
}
}
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL);
pkgconf_client_init(&pkg_client, error_handler, NULL, personality, NULL, environ_lookup_handler);
/* we have determined what features we want most likely. in some cases, we override later. */
pkgconf_client_set_flags(&pkg_client, want_client_flags);