aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/ladspa/0003-plugindir.patch
blob: bd78ee51fcc8897461c303875cd37680cce77d5f (plain)
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
From 8e18df685c5fe747c6d250460d265a402f7900b1 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Sat, 4 Feb 2012 22:05:24 +0000
Subject: [PATCH 3/3] plugindir

---
 src/load.c   |    2 ++
 src/search.c |    5 +----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/load.c b/src/load.c
index c2a5aa7..e221c10 100644
--- a/src/load.c
+++ b/src/load.c
@@ -54,6 +54,8 @@ dlopenLADSPA(const char * pcFilename, int iFlag) {
        to search. */
 
     pcLADSPAPath = getenv("LADSPA_PATH");
+    if (! pcLADSPAPath)
+      pcLADSPAPath = PLUGINDIR;
     
     if (pcLADSPAPath) {
 
diff --git a/src/search.c b/src/search.c
index 0006712..a6b2e78 100644
--- a/src/search.c
+++ b/src/search.c
@@ -99,10 +99,7 @@ LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction) {
 
   pcLADSPAPath = getenv("LADSPA_PATH");
   if (!pcLADSPAPath) {
-    fprintf(stderr,
-	    "Warning: You do not have a LADSPA_PATH "
-	    "environment variable set.\n");
-    return;
+    pcLADSPAPath = PLUGINDIR;
   }
   
   pcStart = pcLADSPAPath;
-- 
1.7.9