OSDN Git Service

block/nfs: Fix 32-bit Windows build
authorBin Meng <bin.meng@windriver.com>
Thu, 8 Sep 2022 13:28:15 +0000 (21:28 +0800)
committerStefan Weil <sw@weilnetz.de>
Mon, 31 Oct 2022 09:06:11 +0000 (10:06 +0100)
commit588fec8a4c3fe9e0d1cb3f7ea6fdd46221e42814
tree257c0242f31dd875d685299c4fccd4757e56042b
parenta3c1e6458dbbe3647ccadfb39cbb585fdc4373a5
block/nfs: Fix 32-bit Windows build

libnfs.h declares nfs_fstat() as the following for win32:

  int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh,
                struct __stat64 *st);

The 'st' parameter should be of type 'struct __stat64'. The
codes happen to build successfully for 64-bit Windows, but it
does not build for 32-bit Windows.

Fixes: 6542aa9c75bc ("block: add native support for NFS")
Fixes: 18a8056e0bc7 ("block/nfs: cache allocated filesize for read-only files")
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Message-Id: <20220908132817.1831008-6-bmeng.cn@gmail.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
block/nfs.c