summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-02-23 03:40:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-02-23 03:40:52 +0000
commit3130a32fd910f424a9d6b811ed23d9a552004c81 (patch)
tree74ed8b2cfd2f8b1bba48f7700447955edcffb0cb
parent554ed4fae98783a3c01880aed00ad415a0976029 (diff)
parent3ebdcb8f9378320ec126bb130f167b7b4908e605 (diff)
downloadextras-3130a32fd910f424a9d6b811ed23d9a552004c81.tar.gz
Merge "Fix win_sdk build."
-rw-r--r--ext4_utils/contents.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
index 13e0510b..48996483 100644
--- a/ext4_utils/contents.c
+++ b/ext4_utils/contents.c
@@ -17,8 +17,27 @@
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>
+#if defined(__linux__)
#include <linux/capability.h>
#include <linux/xattr.h>
+#else
+#include <stdint.h>
+#define VFS_CAP_FLAGS_EFFECTIVE 0x000001
+#define VFS_CAP_U32_2 2
+#define VFS_CAP_U32 VFS_CAP_U32_2
+#define VFS_CAP_REVISION_2 0x02000000
+#define VFS_CAP_REVISION VFS_CAP_REVISION_2
+
+struct vfs_cap_data {
+ uint32_t magic_etc;
+ struct {
+ uint32_t permitted;
+ uint32_t inheritable;
+ } data[VFS_CAP_U32];
+};
+#define XATTR_SELINUX_SUFFIX "selinux"
+#define XATTR_CAPS_SUFFIX "capability"
+#endif /* !defined(__linux__) */
#include "ext4_utils.h"
#include "ext4.h"