Fix compilation error when keyutils.h is used in C++

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()

Signed-off-by: Christophe Vu-Brugier <>
Signed-off-by: David Howells <>
2 files changed