From d6099af20a148d705a16da2aed25b605ba0a162c Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Tue, 16 Aug 2016 16:18:57 -0400 Subject: [PATCH] staging: lustre: Remove static declaration in anonymous union It is not permitted in C++ to have a static declaration inside of an anonymous union. The g++ compiler will complaine with an error like this: error: struct ost_id::::ostid invalid; an anonymous union can only have non-static data members [-fpermissive] This patch changes the code to use an unnamed struct in place of "struct ostid" inside of the anonymous union. That name declaration was completely unnecessary anyway, since it was not used anywhere else. Signed-off-by: Christopher J. Morrone Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4987 Reviewed-on: http://review.whamcloud.com/10176 Reviewed-by: Robert Read Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index 4b2553c6b876..59d45de9e5a2 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -167,7 +167,7 @@ struct lustre_mdt_attrs { */ struct ost_id { union { - struct ostid { + struct { __u64 oi_id; __u64 oi_seq; } oi; -- 2.39.5