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