commit: b34df9dd817069ade7e0526a59aaa9d3f2beb806 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> AuthorDate: Thu Jan 14 02:11:06 2016 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Thu Jan 14 02:11:06 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b34df9dd
fix selinux build src/rc/Makefile | 10 ++++++++-- src/rc/rc-selinux.c | 4 ---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/rc/Makefile b/src/rc/Makefile index 1df26d8..da1e5ee 100644 --- a/src/rc/Makefile +++ b/src/rc/Makefile @@ -75,7 +75,10 @@ check test:: all: ${ALL_PROGS} -checkpath: checkpath.o _usage.o rc-misc.o rc-selinux.o +checkpath: checkpath.o _usage.o rc-misc.o +ifeq (${MKSELINUX},yes) +checkpath: rc-selinux.o +endif ${CC} ${LOCAL_CFLAGS} ${LOCAL_LDFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ $^ ${LDADD} einfon einfo ewarnn ewarn eerrorn eerror ebegin eend ewend \ @@ -101,7 +104,10 @@ mark_service_hotplugged mark_service_failed: do_mark_service.o rc-misc.o mountinfo: mountinfo.o _usage.o rc-misc.o ${CC} ${LOCAL_CFLAGS} ${LOCAL_LDFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ $^ ${LDADD} -openrc rc: rc.o rc-logger.o rc-misc.o rc-plugin.o rc-selinux.o _usage.o +openrc rc: rc.o rc-logger.o rc-misc.o rc-plugin.o _usage.o +ifeq (${MKSELINUX},yes) +openrc rc: rc-selinux.o +endif ${CC} ${LOCAL_CFLAGS} ${LOCAL_LDFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ $^ ${LDADD} openrc-run runscript: openrc-run.o _usage.o rc-misc.o rc-plugin.o diff --git a/src/rc/rc-selinux.c b/src/rc/rc-selinux.c index 3e484a6..ed89be1 100644 --- a/src/rc/rc-selinux.c +++ b/src/rc/rc-selinux.c @@ -15,8 +15,6 @@ * except according to the terms contained in the LICENSE file. */ -#ifdef HAVE_SELINUX - #include <stddef.h> #include <errno.h> #include <dlfcn.h> @@ -386,5 +384,3 @@ out: free(run_init_t); free(curr_t); } - -#endif