]>
git.proxmox.com Git - mirror_iproute2.git/blob - include/dlfcn.h
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>
12 #define _FAKE_DLFCN_HDL (void *)0xbeefcafe
14 static inline void *dlopen(const char *file
, int flag
)
17 return _FAKE_DLFCN_HDL
;
22 extern void *_dlsym(const char *sym
);
23 static inline void *dlsym(void *handle
, const char *sym
)
25 if (handle
!= _FAKE_DLFCN_HDL
)
30 static inline char *dlerror(void)
35 static inline int dlclose(void *handle
)
37 return (handle
== _FAKE_DLFCN_HDL
) ? 0 : 1;