From: Linus Torvalds Date: Sat, 28 May 2016 00:20:27 +0000 (-0700) Subject: nfs: fix anonymous member initializer build failure with older compilers X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e0714ec4f9efe7b86828b0dcc077fd8f5d8e5e91;p=openwrt%2Fstaging%2Fblogic.git nfs: fix anonymous member initializer build failure with older compilers Older versions of gcc don't understand named initializers inside a anonymous structure or union member. It can be worked around by adding the bracin gin the initializer for the anonymous member. Without this, gcc 4.4.4 will fail the build with CC fs/nfs/nfs4state.o fs/nfs/nfs4state.c:69: error: unknown field ‘data’ specified in initializer fs/nfs/nfs4state.c:69: warning: missing braces around initializer fs/nfs/nfs4state.c:69: warning: (near initialization for ‘zero_stateid..data’) make[2]: *** [fs/nfs/nfs4state.o] Error 1 introduced in commit 93b717fd81bf ("NFSv4: Label stateids with the type") Reported-and-tested-by: Boris Ostrovsky Cc: Anna Schumaker Cc: Trond Myklebust Signed-off-by: Linus Torvalds --- diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 5075592df145..9679f4749364 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -66,7 +66,7 @@ #define OPENOWNER_POOL_SIZE 8 const nfs4_stateid zero_stateid = { - .data = { 0 }, + { .data = { 0 } }, .type = NFS4_SPECIAL_STATEID_TYPE, }; static DEFINE_MUTEX(nfs_clid_init_mutex);