summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'external/poky/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch')
-rw-r--r--external/poky/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch b/external/poky/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch
new file mode 100644
index 00000000..8842e3eb
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/rpm/files/0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch
@@ -0,0 +1,29 @@
+From 6878a83f9bac015c64d83cee42530a20a264cc5a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 7 Jan 2020 12:02:06 +0100
+Subject: [PATCH] rpmplugins.c: call dlerror() prior to dlsym()
+
+This is the recommended way in the manpage; if there is
+a lingering error from an unrelated dl*() call that was
+never obtained via dlerror(), it needs to be cleared
+prior to calling dlsym().
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/998]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/rpmplugins.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/rpmplugins.c b/lib/rpmplugins.c
+index 65e684e84..b950f85cf 100644
+--- a/lib/rpmplugins.c
++++ b/lib/rpmplugins.c
+@@ -68,6 +68,8 @@ static rpmPlugin rpmPluginNew(const char *name, const char *path,
+
+ /* make sure the plugin has the supported hooks flag */
+ hooks_name = rstrscat(NULL, name, "_hooks", NULL);
++ /* clear out any old errors that weren't fetched */
++ dlerror();
+ hooks = dlsym(handle, hooks_name);
+ if ((error = dlerror()) != NULL) {
+ rpmlog(RPMLOG_ERR, _("Failed to resolve symbol %s: %s\n"),