File: 0010-Try-libhpmud.so.0-directly.patch

package info (click to toggle)
hplip 3.22.10%2Bdfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 171,296 kB
  • sloc: python: 83,373; ansic: 71,016; cpp: 65,202; sh: 4,408; perl: 4,397; makefile: 937
file content (52 lines) | stat: -rw-r--r-- 2,016 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From: Evgeny Golov <evgeni@debian.org>
Date: Fri, 22 Jul 2016 09:32:56 +0200
Subject: Try libhpmud.so.0 directly

It's the library we ship.

Closes: #600670
---
 scan/sane/marvell.c | 2 +-
 scan/sane/soap.c    | 2 +-
 scan/sane/soapht.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scan/sane/marvell.c b/scan/sane/marvell.c
index ad267a3..6cac67a 100644
--- a/scan/sane/marvell.c
+++ b/scan/sane/marvell.c
@@ -60,7 +60,7 @@ static int bb_load(struct marvell_session *ps, const char *so)
    int stat=1;
 
    /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ 
-   if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
+   if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
    {
 	   if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
            goto bugout;
diff --git a/scan/sane/soap.c b/scan/sane/soap.c
index 07106fe..a45f1a0 100644
--- a/scan/sane/soap.c
+++ b/scan/sane/soap.c
@@ -68,7 +68,7 @@ static int bb_load(struct soap_session *ps, const char *so)
    int stat=1;
 
    /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ 
-   if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
+   if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
    {
 	   if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
            goto bugout;
diff --git a/scan/sane/soapht.c b/scan/sane/soapht.c
index 269ab21..df0e807 100644
--- a/scan/sane/soapht.c
+++ b/scan/sane/soapht.c
@@ -62,7 +62,7 @@ static int bb_load(struct soap_session *ps, const char *so)
    int stat=1;
 
    /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ 
-   if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
+   if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
    {
 	   if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
            goto bugout;