Show
Ignore:
Timestamp:
06/03/11 00:44:00 (2 years ago)
Author:
Nedko Arnaudov <nedko@…>
Children:
78f07f7ad1a4778a5aa49083c4341cbbb4af1556
Parents:
cd3c2e4af45af43b3d3330f84180c6a7a74941a3
git-committer:
Nedko Arnaudov <nedko@arnaudov.name> / 2011-06-03T00:44:00Z+0300
Message:

Make alsapid work when libasound is loaded with dlopen(). Fix for #180

when alsapid is preloaded libasound is not loaded yet
for some unknown reason, late call to dlvsym() fails as well,
at least for mididings (python loads _mididings.so that
implicitly loads libasound.so)

this changeset implements the late symbol lookup,
because it makes the code smaller

the actual fix is to LD_PRELOAD libasound.so as well

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • daemon/loader.c

    r0ba807b r60aaa49  
    485485} 
    486486 
     487#define LD_PRELOAD_ADD "libalsapid.so libasound.so" 
     488 
    487489static void set_ldpreload(void) 
    488490{ 
     
    493495  if (old != NULL) 
    494496  { 
    495     new = catdup3("libalsapid.so", " ", old); 
     497    new = catdup3(LD_PRELOAD_ADD, " ", old); 
    496498    if (new == NULL) 
    497499    { 
     
    502504  else 
    503505  { 
    504     new = "libalsapid.so"; 
     506    new = LD_PRELOAD_ADD; 
    505507  } 
    506508