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

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