lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20090209075610.3D86CDDDA2@ozlabs.org>
Date:	Mon, 09 Feb 2009 18:22:26 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	linux-kernel@...r.kernel.org
CC:	Arjan van de Ven <arjan@...radead.org>
Subject: [PATCH 1/4] module_param: bool params should still work with #include <stdbool.h>


Code such as "module_param(foo, bool, 0400)" no longer compiles if one
includes stdbool.h: the ISO standard requires that this "#define bool
_Bool".

The fix is simple: define those as well.

Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -180,6 +180,11 @@ extern int param_get_bool(char *buffer, 
 extern int param_get_bool(char *buffer, struct kernel_param *kp);
 #define param_check_bool(name, p) __param_check(name, p, int)
 
+/* #include <stdbool.h> transforms module_param(foo, bool, 0). */
+#define param_set__Bool param_set_bool
+#define param_get__Bool param_get_bool
+#define param_check__Bool param_check_bool
+
 extern int param_set_invbool(const char *val, struct kernel_param *kp);
 extern int param_get_invbool(char *buffer, struct kernel_param *kp);
 #define param_check_invbool(name, p) __param_check(name, p, int)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ