equal
deleted
inserted
replaced
1 # On Solaris, fix stunnel so that the linker know where both the 32 and 64 bit |
|
2 # interposer libraries are. If you use LD_PRELOAD with the wrong bittedness |
|
3 # of interposer, the runtime linker hits a fatal error in trying to load |
|
4 # mismatched ELF objects. |
|
5 # |
|
6 diff -r -u stunnel-4.55.orig/src/client.c stunnel-4.55/src/client.c |
|
7 --- stunnel-4.55.orig/src/client.c 2013-02-28 00:17:58.000000000 -0800 |
|
8 +++ stunnel-4.55/src/client.c 2013-03-21 22:55:21.098479331 -0700 |
|
9 @@ -1100,9 +1100,14 @@ |
|
10 /* just don't set these variables if getnameinfo() fails */ |
|
11 putenv(str_printf("REMOTE_HOST=%s", host)); |
|
12 if(c->opt->option.transparent_src) { |
|
13 - putenv("LD_PRELOAD=" LIBDIR "/libstunnel.so"); |
|
14 - /* for Tru64 _RLD_LIST is used instead */ |
|
15 +#ifdef MACH64 |
|
16 + putenv("LD_PRELOAD_32=" LIBDIR "/libstunnel.so"); |
|
17 + putenv("LD_PRELOAD_64=" LIBDIR "/" MACH64 "/libstunnel.so"); |
|
18 +#elif __osf /* for Tru64 _RLD_LIST is used instead */ |
|
19 putenv("_RLD_LIST=" LIBDIR "/libstunnel.so:DEFAULT"); |
|
20 +#else |
|
21 + putenv("LD_PRELOAD=" LIBDIR "/libstunnel.so"); |
|
22 +#endif |
|
23 } |
|
24 } |
|
25 |
|