mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	don't require a module name when resolving a dl symbol
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2352 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									ff09fa391a
								
							
						
					
					
						commit
						59a7467a64
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -42,12 +42,14 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s
 | 
				
			||||||
    pa_void_func_t f;
 | 
					    pa_void_func_t f;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_assert(handle);
 | 
					    pa_assert(handle);
 | 
				
			||||||
    pa_assert(module);
 | 
					 | 
				
			||||||
    pa_assert(symbol);
 | 
					    pa_assert(symbol);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((f = ((pa_void_func_t) (long) lt_dlsym(handle, symbol))))
 | 
					    if ((f = ((pa_void_func_t) (size_t) lt_dlsym(handle, symbol))))
 | 
				
			||||||
        return f;
 | 
					        return f;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!module)
 | 
				
			||||||
 | 
					        return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* As the .la files might have been cleansed from the system, we should
 | 
					    /* As the .la files might have been cleansed from the system, we should
 | 
				
			||||||
     * try with the ltdl prefix as well. */
 | 
					     * try with the ltdl prefix as well. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,7 +59,7 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s
 | 
				
			||||||
        if (!isalnum(*c))
 | 
					        if (!isalnum(*c))
 | 
				
			||||||
            *c = '_';
 | 
					            *c = '_';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    f = (pa_void_func_t) (long) lt_dlsym(handle, sn);
 | 
					    f = (pa_void_func_t) (size_t) lt_dlsym(handle, sn);
 | 
				
			||||||
    pa_xfree(sn);
 | 
					    pa_xfree(sn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return f;
 | 
					    return f;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue