From 8b80fb92e5e07637f42382ec4e6e3417ade185c9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 25 Oct 2019 00:08:02 +0200 Subject: Add mockup of "struct stat" for WinDOS Signed-off-by: David Oberhollenzer --- include/util/compat.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/util/compat.h b/include/util/compat.h index 74d0b6f..d69a1de 100644 --- a/include/util/compat.h +++ b/include/util/compat.h @@ -38,6 +38,8 @@ #endif #if defined(_WIN32) || defined(__WINDOWS__) +#include "sqfs/inode.h" + #define S_IFSOCK SQFS_INODE_MODE_SOCK #define S_IFLNK SQFS_INODE_MODE_LNK #define S_IFREG SQFS_INODE_MODE_REG @@ -74,6 +76,22 @@ #define S_IWOTH SQFS_INODE_OTHERS_W #define S_IXOTH SQFS_INODE_OTHERS_X +struct stat { + sqfs_u32 st_dev; + sqfs_u32 st_ino; + sqfs_u16 st_mode; + sqfs_u16 st_nlink; + sqfs_u32 st_uid; + sqfs_u32 st_gid; + sqfs_u32 st_rdev; + sqfs_u64 st_size; + sqfs_u32 st_blksize; + sqfs_u32 st_blocks; + sqfs_u64 st_atime; + sqfs_u64 st_mtime; + sqfs_u64 st_ctime; +}; + /* lifted from musl libc */ #define major(x) \ ((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) )) -- cgit v1.2.3