@@ -244,11 +244,11 @@ long keyctl_dh_compute(key_serial_t priv, key_serial_t prime,
return keyctl(KEYCTL_DH_COMPUTE, ¶ms, buffer, buflen, 0);
}
-long keyctl_dh_compute_kdf(key_serial_t private, key_serial_t prime,
+long keyctl_dh_compute_kdf(key_serial_t priv, key_serial_t prime,
key_serial_t base, char *hashname, char *otherinfo,
size_t otherinfolen, char *buffer, size_t buflen)
{
- struct keyctl_dh_params params = { .priv = private,
+ struct keyctl_dh_params params = { .priv = priv,
.prime = prime,
.base = base };
struct keyctl_kdf_params kdfparams = { .hashname = hashname,
@@ -220,7 +220,7 @@ extern long keyctl_invalidate(key_serial_t id);
extern long keyctl_get_persistent(uid_t uid, key_serial_t id);
extern long keyctl_dh_compute(key_serial_t priv, key_serial_t prime,
key_serial_t base, char *buffer, size_t buflen);
-extern long keyctl_dh_compute_kdf(key_serial_t private, key_serial_t prime,
+extern long keyctl_dh_compute_kdf(key_serial_t priv, key_serial_t prime,
key_serial_t base, char *hashname,
char *otherinfo, size_t otherinfolen,
char *buffer, size_t buflen);
The declaration of the keyctl_dh_compute_kdf() function contains a parameter named "private". Unfortunately, "private" is a C++ reserved keyword. As a consequence, compiling a C++ program that includes keyutils.h fails. This patch renames the "private" variable to "priv" since a similar parameter is named this way in the nearby keyctl_dh_compute() function. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> --- keyutils.c | 4 ++-- keyutils.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)