localedef: Use initializer for flexible array member [BZ #24950]
[glibc.git] / elf / tst-pathopt.c
blobe2c96fbc72e37afc9f835840f49d49a77069be92
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 #include <support/test-driver.c>