Changeset 3139:f999c34625be in roaraudio


Ignore:
Timestamp:
01/15/10 11:39:36 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

got it to not break cat(1) ;)

Location:
libroaross
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroaross/Makefile

    r3138 r3139  
    1111CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 
    1212LDFLAGS = -g $(SHARED) $(LDPATH) 
    13 LIBS    = $(LIBROAR) 
     13LIBS    = $(LIBROAR) -ldl 
    1414 
    1515all: ${TARGETS} 
  • libroaross/libroaross.c

    r3138 r3139  
    5656 
    5757#include <sys/stat.h> 
     58#include <dlfcn.h> 
     59 
     60#if defined(RTLD_NEXT) 
     61#define REAL_LIBC RTLD_NEXT 
     62#else 
     63#define REAL_LIBC ((void *) -1L) 
     64#endif 
    5865 
    5966#define _MAX_POINTER  8 
     
    8592static void _init_os (void) { 
    8693 memset(&_os, 0, sizeof(_os)); 
     94 
     95 _os.open  = dlsym(REAL_LIBC, "open"); 
     96 _os.close = dlsym(REAL_LIBC, "close"); 
     97 _os.write = dlsym(REAL_LIBC, "write"); 
     98 _os.read  = dlsym(REAL_LIBC, "read"); 
    8799} 
    88100 
Note: See TracChangeset for help on using the changeset viewer.