diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/pkgconf/001-unveil-fixes.patch | |
Diffstat (limited to 'vcpkg/ports/pkgconf/001-unveil-fixes.patch')
| -rw-r--r-- | vcpkg/ports/pkgconf/001-unveil-fixes.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vcpkg/ports/pkgconf/001-unveil-fixes.patch b/vcpkg/ports/pkgconf/001-unveil-fixes.patch new file mode 100644 index 0000000..fb171a6 --- /dev/null +++ b/vcpkg/ports/pkgconf/001-unveil-fixes.patch @@ -0,0 +1,50 @@ +diff --git a/cli/main.c b/cli/main.c +index a1cf90e..3ab2092 100644 +--- a/cli/main.c ++++ b/cli/main.c +@@ -1055,7 +1055,7 @@ unveil_search_paths(const pkgconf_client_t *client, const pkgconf_cross_personal + { + pkgconf_path_t *pn = n->data; + +- if (pkgconf_unveil(pn->path, "r") == -1) ++ if (pkgconf_unveil(pn->path, "r") == -1 && errno != ENOENT) + return false; + } + +@@ -1063,7 +1063,7 @@ unveil_search_paths(const pkgconf_client_t *client, const pkgconf_cross_personal + { + pkgconf_path_t *pn = n->data; + +- if (pkgconf_unveil(pn->path, "r") == -1) ++ if (pkgconf_unveil(pn->path, "r") == -1 && errno != ENOENT) + return false; + } + +@@ -1276,13 +1276,6 @@ main(int argc, char *argv[]) + /* now, bring up the client. settings are preserved since the client is prealloced */ + pkgconf_client_init(&pkg_client, error_handler, NULL, personality); + +- /* unveil the entire search path now that we have loaded the personality data. */ +- if (!unveil_search_paths(&pkg_client, personality)) +- { +- fprintf(stderr, "pkgconf: unveil failed: %s\n", strerror(errno)); +- return EXIT_FAILURE; +- } +- + #ifndef PKGCONF_LITE + if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX || getenv("PKG_CONFIG_MSVC_SYNTAX") != NULL) + want_render_ops = msvc_renderer_get(); +@@ -1452,6 +1445,13 @@ main(int argc, char *argv[]) + /* at this point, want_client_flags should be set, so build the dir list */ + pkgconf_client_dir_list_build(&pkg_client, personality); + ++ /* unveil the entire search path now that we have loaded the personality data. */ ++ if (!unveil_search_paths(&pkg_client, personality)) ++ { ++ fprintf(stderr, "pkgconf: unveil failed: %s\n", strerror(errno)); ++ return EXIT_FAILURE; ++ } ++ + /* preload any files in PKG_CONFIG_PRELOADED_FILES */ + pkgconf_client_preload_from_environ(&pkg_client, "PKG_CONFIG_PRELOADED_FILES"); + |