Blame support/links-dso-program.cc

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