libselinux: DISABLE_BOOL move to include headers

Some systems, like Mac, don't have stdio_ext.h. Since we're
building with DISABLE_BOOL=y on Mac, just include the
header files with the DISABLE define, and use the bare
minimum headers for DISABLE_BOOL=y.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
This commit is contained in:
William Roberts 2016-10-17 16:24:09 -04:00 committed by Stephen Smalley
parent 16c123f4b1
commit a796218749
1 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,8 @@
* Dan Walsh <dwalsh@redhat.com> - Added security_load_booleans().
*/
#ifndef DISABLE_BOOL
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -25,8 +27,6 @@
#define SELINUX_BOOL_DIR "/booleans/"
#ifndef DISABLE_BOOL
static int filename_select(const struct dirent *d)
{
if (d->d_name[0] == '.'
@ -561,6 +561,10 @@ int security_load_booleans(char *path)
}
#else
#include <stdlib.h>
#include "selinux_internal.h"
int security_set_boolean_list(size_t boolcnt __attribute__((unused)),
SELboolean * boollist __attribute__((unused)),
int permanent __attribute__((unused)))