2 * Stub dlfcn implementation for systems that lack shared library support
3 * but obviously can still reference compiled-in symbols.
7 #include_next <dlfcn.h>
11 #define _FAKE_DLFCN_HDL (void *)0xbeefcafe
13 static inline void *dlopen(const char *file, int flag)
16 return _FAKE_DLFCN_HDL;
21 extern void *_dlsym(const char *sym);
22 static inline void *dlsym(void *handle, const char *sym)
24 if (handle != _FAKE_DLFCN_HDL)
29 static inline char *dlerror(void)
34 static inline int dlclose(void *handle)
36 return (handle == _FAKE_DLFCN_HDL) ? 0 : 1;