From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423394AbdKRSub (ORCPT ); Sat, 18 Nov 2017 13:50:31 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:35074 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161145AbdKRSuQ (ORCPT ); Sat, 18 Nov 2017 13:50:16 -0500 X-Google-Smtp-Source: AGs4zMZcRC+6cYo++OPeHuW5DKAhbfM0Np6tZpJd3zbH4nRvRju8iKWpLLX8VFfL37YVE5wlh0lpOA== From: Trond Myklebust To: Anna Schumaker Cc: Boris Ostrovsky , "linux-nfs @ vger . kernel . org" , "linux-kernel @ vger . kernel . org" Subject: [PATCH] NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid" Date: Sat, 18 Nov 2017 13:50:11 -0500 Message-Id: <20171118185011.4729-1-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc 4.4.4 is too old to have full C11 anonymous union support, so the current initialiser fails to compile. Reported-by: Boris Ostrovsky Signed-off-by: Trond Myklebust --- fs/nfs/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 980462d577ca..231b5ea2464a 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -71,8 +71,8 @@ const nfs4_stateid zero_stateid = { }; const nfs4_stateid invalid_stateid = { { - .seqid = cpu_to_be32(0xffffffffU), - .other = { 0 }, + /* Funky initialiser keeps older gcc versions happy */ + .data = { 0xff, 0xff, 0xff, 0xff, 0 }, }, .type = NFS4_INVALID_STATEID_TYPE, }; -- 2.14.3