[PATCH] include/keys/system_keyring.h: fix building error

From: Cong Ding
Date: Fri Jan 18 2013 - 19:53:18 EST


When I am doing "make randconfig", it causes the following building error if
CONFIG_SYSTEM_TRUSTED_KEYRING is not defined and CONFIG_MODULE_SIG is defined.

kernel/module_signing.c: In function ârequest_asymmetric_keyâ:
kernel/module_signing.c:161:36: error: âsystem_trusted_keyringâ undeclared
(first use in this function)
kernel/module_signing.c:161:36: note: each undeclared identifier is reported
only once for each function it appears in

Signed-off-by: Cong Ding <dinggnu@xxxxxxxxx>
---
include/keys/system_keyring.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h
index 8dabc39..d66c92d 100644
--- a/include/keys/system_keyring.h
+++ b/include/keys/system_keyring.h
@@ -12,7 +12,7 @@
#ifndef _KEYS_SYSTEM_KEYRING_H
#define _KEYS_SYSTEM_KEYRING_H

-#ifdef CONFIG_SYSTEM_TRUSTED_KEYRING
+#if defined(CONFIG_SYSTEM_TRUSTED_KEYRING) || defined(CONFIG_MODULE_SIG)

#include <linux/key.h>

--
1.7.10.4

--
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/