toaruos/userspace/lib/dlfcn.c

24 lines
403 B
C
Raw Normal View History

2016-12-05 11:40:10 +03:00
/*
* Stub library for providing dlopen, dlclose, dlsym.
*/
#include <stdlib.h>
static char * error = "dlopen functions not available";
void * __attribute__((weak)) dlopen(const char * filename, int flags) {
return NULL;
}
int __attribute__((weak)) dlclose(void * handle) {
return -1;
}
void * dlsym(void * handle, const char * symbol) {
return NULL;
}
char * dlerror(void) {
return error;
}