aboutsummaryrefslogtreecommitdiff
path: root/include/util
diff options
context:
space:
mode:
Diffstat (limited to 'include/util')
-rw-r--r--include/util/compat.h18
1 files changed, 18 insertions, 0 deletions
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) ))