Blame support/links-dso-program-c.c

Packit Service 20a62b
#include <stdio.h>
Packit Service 20a62b
Packit Service b5b91c
/* makedb needs selinux dso's.  */
Packit Service b5b91c
#ifdef HAVE_SELINUX
Packit Service b5b91c
# include <selinux/selinux.h>
Packit Service b5b91c
#endif
Packit Service b5b91c
Packit Service b5b91c
/* The purpose of this file is to indicate to the build system which
Packit Service b5b91c
   shared objects need to be copied into the testroot, such as gcc or
Packit Service b5b91c
   selinux support libraries.  This program is never executed, only
Packit Service b5b91c
   scanned for dependencies on shared objects, so the code below may
Packit Service b5b91c
   seem weird - it's written to survive gcc optimization and force
Packit Service b5b91c
   such dependencies.
Packit Service b5b91c
*/
Packit Service b5b91c
Packit Service 20a62b
int
Packit Service 20a62b
main (int argc, char **argv)
Packit Service 20a62b
{
Packit Service 20a62b
  /* Complexity to keep gcc from optimizing this away.  */
Packit Service 20a62b
  printf ("This is a test %s.\n", argc > 1 ? argv[1] : "null");
Packit Service b5b91c
#ifdef HAVE_SELINUX
Packit Service b5b91c
  /* This exists to force libselinux.so to be required.  */
Packit Service b5b91c
  printf ("selinux %d\n", is_selinux_enabled ());
Packit Service b5b91c
#endif
Packit Service 20a62b
  return 0;
Packit Service 20a62b
}