diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2015-03-25 00:57:05 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2015-03-25 01:01:38 -0500 |
commit | a4cf61e8bf827dc405a547c314e840dab11fc979 (patch) | |
tree | 7a9d9c900ec5dd0940159e7e9a13bb22148f800a /src/rc/rc-selinux.h | |
parent | d38cc8f2210e839c4935208917138e4809ece758 (diff) |
selinux: unconditionally include the header and provide stub methods
If selinux is disabled, then stub methods will be provided instead of
calling the real methods. This removes some warnings about unused
parameters which used to be covered up with #ifdef HAVE_SELINUX.
Signed-off-by: Jason Zaman <jason@perfinion.com>
Diffstat (limited to 'src/rc/rc-selinux.h')
-rw-r--r-- | src/rc/rc-selinux.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rc/rc-selinux.h b/src/rc/rc-selinux.h index e28f3339..039890b7 100644 --- a/src/rc/rc-selinux.h +++ b/src/rc/rc-selinux.h @@ -26,10 +26,24 @@ #ifndef RC_SELINUX_UTIL_H #define RC_SELINUX_UTIL_H +#ifdef HAVE_SELINUX + int selinux_util_open(void); int selinux_util_label(const char *path); int selinux_util_close(void); void selinux_setup(char **argv); +#else + +/* always return false for selinux_util_open() */ +#define selinux_util_open() (0) +#define selinux_util_label(x) do { } while(0) +#define selinux_util_close() do { } while(0) + +#define selinux_setup(x) do { } while(0) + +#endif + + #endif |