lkml.org 
[lkml]   [2018]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 02/11] UAPI: keys: Fix use of C++ keywords as structural members [ver #2]
From
Date
The keyctl_dh_params struct uses a C++ keyword as structural members.  Fix
this by inserting an anonymous union that provides an alternative name and
then hide the reserved name in C++.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Mat Martineau <mathew.j.martineau@linux.intel.com>
cc: keyrings@vger.kernel.org
---

include/uapi/linux/keyctl.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/keyctl.h b/include/uapi/linux/keyctl.h
index 910cc4334b21..170f015d1f25 100644
--- a/include/uapi/linux/keyctl.h
+++ b/include/uapi/linux/keyctl.h
@@ -65,7 +65,12 @@

/* keyctl structures */
struct keyctl_dh_params {
- __s32 dh_private;
+ union {
+#ifndef __cplusplus
+ __s32 private;
+#endif
+ __s32 dh_private;
+ };
__s32 prime;
__s32 base;
};
\
 
 \ /
  Last update: 2018-09-06 11:19    [W:0.123 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site