audio/dexed: Add better workaround for broken ENVIRON(7) in shared libraries
This commit is contained in:
parent
391630db44
commit
4838430844
@ -2,7 +2,7 @@ PORTNAME= dexed
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.9.6-16
|
||||
DISTVERSIONSUFFIX= -g1df9a58
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= audio
|
||||
PKGNAMESUFFIX= -synth
|
||||
|
||||
|
@ -1,22 +1,24 @@
|
||||
- otherwise it fails with unknown 'environ' symbol, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263265
|
||||
|
||||
--- libs/JUCE/modules/juce_core/native/juce_linux_Files.cpp.orig 2022-04-13 18:55:08 UTC
|
||||
--- libs/JUCE/modules/juce_core/native/juce_linux_Files.cpp.orig 2022-08-15 18:29:17 UTC
|
||||
+++ libs/JUCE/modules/juce_core/native/juce_linux_Files.cpp
|
||||
@@ -21,7 +21,7 @@
|
||||
@@ -21,7 +21,9 @@
|
||||
*/
|
||||
|
||||
#if JUCE_BSD
|
||||
-extern char** environ;
|
||||
+//extern char** environ;
|
||||
+//extern char** environ; // this is broken on FreeBSD, see https://reviews.freebsd.org/D30842
|
||||
+#include <dlfcn.h>
|
||||
+static char*** environ_ptr = (char***)dlsym(RTLD_DEFAULT, "environ"); // workaround for the above
|
||||
#endif
|
||||
|
||||
namespace juce
|
||||
@@ -230,7 +230,7 @@ bool Process::openDocument (const String& fileName, co
|
||||
@@ -229,7 +231,7 @@ bool Process::openDocument (const String& fileName, co
|
||||
setsid();
|
||||
|
||||
// Child process
|
||||
- execve (argv[0], (char**) argv, environ);
|
||||
+ execv (argv[0], (char**) argv);
|
||||
+ execve (argv[0], (char**) argv, *environ_ptr);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user