File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,12 @@ class LinuxLoader : ILibraryLoader
4949
5050 public IntPtr Load ( string dllToLoad )
5151 {
52- var filename = $ "lib{ dllToLoad } .so";
5352 ClearError ( ) ;
54- var res = dlopen ( filename , RTLD_NOW | RTLD_GLOBAL ) ;
53+ var res = dlopen ( dllToLoad , RTLD_NOW | RTLD_GLOBAL ) ;
5554 if ( res == IntPtr . Zero )
5655 {
5756 var err = GetError ( ) ;
58- throw new DllNotFoundException ( $ "Could not load { filename } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
57+ throw new DllNotFoundException ( $ "Could not load { dllToLoad } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
5958 }
6059
6160 return res ;
@@ -120,13 +119,12 @@ class DarwinLoader : ILibraryLoader
120119
121120 public IntPtr Load ( string dllToLoad )
122121 {
123- var filename = $ "lib{ dllToLoad } .dylib";
124122 ClearError ( ) ;
125- var res = dlopen ( filename , RTLD_NOW | RTLD_GLOBAL ) ;
123+ var res = dlopen ( dllToLoad , RTLD_NOW | RTLD_GLOBAL ) ;
126124 if ( res == IntPtr . Zero )
127125 {
128126 var err = GetError ( ) ;
129- throw new DllNotFoundException ( $ "Could not load { filename } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
127+ throw new DllNotFoundException ( $ "Could not load { dllToLoad } with flags RTLD_NOW | RTLD_GLOBAL: { err } ") ;
130128 }
131129
132130 return res ;
You can’t perform that action at this time.
0 commit comments