diff --git a/m4/virt-selinux.m4 b/m4/virt-selinux.m4 index 64e6980844..fb541e207e 100644 --- a/m4/virt-selinux.m4 +++ b/m4/virt-selinux.m4 @@ -27,23 +27,6 @@ AC_DEFUN([LIBVIRT_CHECK_SELINUX],[ [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 -#include -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 diff --git a/tests/securityselinuxhelper.c b/tests/securityselinuxhelper.c index f89224c07a..0556241fd5 100644 --- a/tests/securityselinuxhelper.c +++ b/tests/securityselinuxhelper.c @@ -53,8 +53,7 @@ static const char *(*real_selinux_lxc_contexts_path)(void); #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, @@ -288,7 +287,7 @@ const char *selinux_lxc_contexts_path(void) 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;