Re: linux-next: Tree for July 1 (fix CONFIG_AUDIT_WATCH=n build)

From: Bartlomiej Zolnierkiewicz
Date: Wed Jul 01 2009 - 09:00:46 EST



Hi,

On Wednesday 01 July 2009 10:39:03 Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20090630:

From: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
Subject: [PATCH] audit: fix CONFIG_AUDIT_WATCH=n build

Fix:

kernel/auditfilter.c: In function âaudit_data_to_entryâ:
kernel/auditfilter.c:501: error: expected expression before â{â token
kernel/auditfilter.c: In function âaudit_add_ruleâ:
kernel/auditfilter.c:891: error: expected expression before â{â token
make[1]: *** [kernel/auditfilter.o] Error 1
make: *** [kernel/auditfilter.o] Error 2

introduced by commit de85e5bc3690c3063aea790279e898adb5bac0ba
("Audit: split audit watch Kconfig").

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
---
BTW defines are passà (using static inlines instead for CONFIG_AUDIT=n
and CONFIG_AUDIT_WATCH=n stuff would be an even better solution)..

kernel/audit.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Index: b/kernel/audit.h
===================================================================
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -117,12 +117,11 @@ extern int audit_watch_compare(struct au
#else
#define audit_put_watch(w) {}
#define audit_get_watch(w) {}
-#define audit_to_watch(k, p, l, o) { -EINVAL }
-#define audit_add_watch(k, l) { -EINVAL }
+#define audit_to_watch(k, p, l, o) (-EINVAL)
+#define audit_add_watch(k, l) (-EINVAL)
#define audit_remove_watch_rule(k) BUG()
#define audit_watch_path(w) ""
#define audit_watch_compare(w, i, d) 0
-
#endif /* CONFIG_AUDIT_WATCH */

#ifdef CONFIG_AUDIT_TREE
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/