Fix gethostbyaddr in6addr_any, in6addr_loopback namespace (bug 18532).
[glibc.git] / elf / tst-pathopt.c
blob8d73ad4def8015591ba129e9c74ec208756b1ea9
1 #include <dlfcn.h>
2 #include <mcheck.h>
3 #include <stdio.h>
4 #include <stdlib.h>
7 static int
8 do_test (void)
10 void *h;
11 int (*fp) (int);
12 int result;
14 mtrace ();
16 h = dlopen ("renamed.so", RTLD_LAZY);
17 if (h == NULL)
19 printf ("failed to load \"%s\": %s\n", "renamed.so", dlerror ());
20 exit (1);
23 fp = dlsym (h, "in_renamed");
24 if (fp == NULL)
26 printf ("lookup of \"%s\" failed: %s\n", "in_renamed", dlerror ());
27 exit (1);
30 result = fp (10);
32 if (dlclose (h) != 0)
34 printf ("failed to close \"%s\": %s\n", "renamed.so", dlerror ());
35 exit (1);
38 return result;
41 #define TEST_FUNCTION do_test ()
42 #include "../test-skeleton.c"