[fgetfilecon_raw], [selinux/selinux.h])
if test "$with_selinux" = "yes"; then
- # libselinux changed signatures for 2.5
- # TODO: Drop once we don't support Ubuntu 16.04
- AC_CACHE_CHECK([for selinux selabel_open parameter type],
- [lv_cv_selabel_open_const],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
-#include <selinux/selinux.h>
-#include <selinux/label.h>
-struct selabel_handle *selabel_open(unsigned, struct selinux_opt *, unsigned);
- ]])],
- [lv_cv_selabel_open_const=''],
- [lv_cv_selabel_open_const='const'])])
- AC_DEFINE_UNQUOTED([VIR_SELINUX_OPEN_CONST], [$lv_cv_selabel_open_const],
- [Define to empty or 'const' depending on how SELinux qualifies its
- selabel_open parameter])
-
AC_MSG_CHECKING([SELinux mount point])
if test "$with_selinux_mount" = "check" || test -z "$with_selinux_mount"; then
if test -d /sys/fs/selinux ; then
#endif
static struct selabel_handle *(*real_selabel_open)(unsigned int backend,
- VIR_SELINUX_OPEN_CONST
- struct selinux_opt *opts,
+ const struct selinux_opt *opts,
unsigned nopts);
static void (*real_selabel_close)(struct selabel_handle *handle);
static int (*real_selabel_lookup_raw)(struct selabel_handle *handle,
struct selabel_handle *
selabel_open(unsigned int backend,
- VIR_SELINUX_OPEN_CONST struct selinux_opt *opts,
+ const struct selinux_opt *opts,
unsigned nopts)
{
char *fake_handle;