]>
git.proxmox.com Git - mirror_iproute2.git/blob - include/dlfcn.h
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Stub dlfcn implementation for systems that lack shared library support
4 * but obviously can still reference compiled-in symbols.
8 #include_next <dlfcn.h>
13 #define _FAKE_DLFCN_HDL (void *)0xbeefcafe
15 static inline void *dlopen(const char *file
, int flag
)
18 return _FAKE_DLFCN_HDL
;
23 void *_dlsym(const char *sym
);
24 static inline void *dlsym(void *handle
, const char *sym
)
26 if (handle
!= _FAKE_DLFCN_HDL
)
31 static inline char *dlerror(void)
36 static inline int dlclose(void *handle
)
38 return (handle
== _FAKE_DLFCN_HDL
) ? 0 : 1;