1 #include <stdio.h>
2 
3 /* makedb needs selinux dso's.  */
4 #ifdef HAVE_SELINUX
5 # include <selinux/selinux.h>
6 #endif
7 
8 /* The purpose of this file is to indicate to the build system which
9    shared objects need to be copied into the testroot, such as gcc or
10    selinux support libraries.  This program is never executed, only
11    scanned for dependencies on shared objects, so the code below may
12    seem weird - it's written to survive gcc optimization and force
13    such dependencies.
14 */
15 
16 int
main(int argc,char ** argv)17 main (int argc, char **argv)
18 {
19   /* Complexity to keep gcc from optimizing this away.  */
20   printf ("This is a test %s.\n", argc > 1 ? argv[1] : "null");
21 #ifdef HAVE_SELINUX
22   /* This exists to force libselinux.so to be required.  */
23   printf ("selinux %d\n", is_selinux_enabled ());
24 #endif
25   return 0;
26 }
27