Skip to content

Commit 445f288

Browse files
trondmypdamschuma-ntap
authored andcommitted
NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid"
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> (compile-)Tested-by: Boris Ostrovsky <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent fcfa447 commit 445f288

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/nfs/nfs4state.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const nfs4_stateid zero_stateid = {
7171
};
7272
const nfs4_stateid invalid_stateid = {
7373
{
74-
.seqid = cpu_to_be32(0xffffffffU),
75-
.other = { 0 },
74+
/* Funky initialiser keeps older gcc versions happy */
75+
.data = { 0xff, 0xff, 0xff, 0xff, 0 },
7676
},
7777
.type = NFS4_INVALID_STATEID_TYPE,
7878
};

0 commit comments

Comments
 (0)