From 23966912fbbc74980a0900c3d29613f038fad791 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 19 Jun 2012 16:19:18 +0200 Subject: libmount: improve ifdef HAVE_LIBSELINUX stuff Signed-off-by: Karel Zak --- libmount/src/optstr.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'libmount/src/optstr.c') diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index cc1bef84f..08c12150e 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -774,14 +774,22 @@ err: * * Returns: 0 on success, negative number in case of error. */ +#ifndef HAVE_LIBSELINUX int mnt_optstr_fix_secontext(char **optstr __attribute__ ((__unused__)), char *value __attribute__ ((__unused__)), size_t valsz __attribute__ ((__unused__)), char **next __attribute__ ((__unused__))) +{ + return 0; +} +#else +int mnt_optstr_fix_secontext(char **optstr, + char *value, + size_t valsz, + char **next) { int rc = 0; -#ifdef HAVE_LIBSELINUX security_context_t raw = NULL; char *p, *val, *begin, *end; size_t sz; @@ -839,9 +847,10 @@ int mnt_optstr_fix_secontext(char **optstr __attribute__ ((__unused__)), mnt_optstr_remove_option_at(optstr, begin, end); rc = insert_value(optstr, begin, val, next); free(val); -#endif + return rc; } +#endif static int set_uint_value(char **optstr, unsigned int num, char *begin, char *end, char **next) -- cgit v1.2.3-55-g7522