#include <unistd.h>
#include <string.h>
#include <dlfcn.h>
+#include <gnu/lib-names.h>
#define ALIAS(ret,syscall,params,brfunc) \
extern ret syscall params __attribute__((alias (brfunc)))
{
void *dl;
- dl = dlopen ("/lib64/libc.so.6", RTLD_LAZY|RTLD_LOCAL);
+ dl = dlopen ("/lib64/" LIBC_SO, RTLD_LAZY|RTLD_LOCAL);
if (dl == NULL) // Try '/lib/' also
- dl = dlopen("/lib/libc.so.6", RTLD_LAZY|RTLD_LOCAL);
+ dl = dlopen("/lib/" LIBC_SO, RTLD_LAZY|RTLD_LOCAL);
if (dl == NULL) {
fprintf (stderr, "%s\n", dlerror ());
abort ();