Blame support/links-dso-program.cc

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