#include <sys/stat.h>
#include <sys/types.h>
-#ifdef USE_MINGW
+#ifdef _WIN32
#include <winsock2.h>
inode_set_permissions(inode, dentries.mode,
dentries.uid, dentries.gid, dentries.mtime);
-#ifndef USE_MINGW
+#ifndef _WIN32
if (sehnd) {
char *path = NULL;
char *secontext = NULL;
return root_inode;
}
-#ifndef USE_MINGW
+#ifndef _WIN32
/* Read a local directory and create the same tree in the generated filesystem.
Calls itself recursively with each directory in the given directory.
full_path is an absolute or relative path, with a trailing slash, to the
error("can't set android permissions - built without android support");
#endif
}
-#ifndef USE_MINGW
+#ifndef _WIN32
if (sehnd) {
if (selabel_lookup(sehnd, &dentries[i].secon, dentries[i].path, stat.st_mode) < 0) {
error("cannot lookup security context for %s", dentries[i].path);
static void extract_base_fs_allocations(const char *directory, const char *mountpoint,
FILE* base_alloc_file_in) {
#define err_msg "base file badly formatted"
-#ifndef USE_MINGW
+#ifndef _WIN32
// FORMAT Version 1.0: filename blk_mapping
const char *base_alloc_file_in_format = "%s %s";
const int base_file_format_param_count = 2;
if (info.feat_compat & EXT4_FEATURE_COMPAT_RESIZE_INODE)
ext4_create_resize_inode();
-#ifdef USE_MINGW
+#ifdef _WIN32
// Windows needs only 'create an empty fs image' functionality
assert(!directory);
root_inode_num = build_default_directory_structure(mountpoint, sehnd);
root_mode = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
inode_set_permissions(root_inode_num, root_mode, 0, 0, 0);
-#ifndef USE_MINGW
+#ifndef _WIN32
if (sehnd) {
char *secontext = NULL;
#include <private/canned_fs_config.h>
#endif
-#ifndef USE_MINGW
+#ifndef _WIN32
#include <selinux/selinux.h>
#include <selinux/label.h>
#if !defined(HOST)
#include "make_ext4fs.h"
#include "ext4_utils.h"
-#ifndef USE_MINGW /* O_BINARY is windows-specific flag */
+#ifndef _WIN32 /* O_BINARY is windows-specific flag */
#define O_BINARY 0
#endif
FILE* block_list_file = NULL;
FILE* base_alloc_file_in = NULL;
FILE* base_alloc_file_out = NULL;
-#ifndef USE_MINGW
+#ifndef _WIN32
struct selinux_opt seopts[] = { { SELABEL_OPT_PATH, "" } };
#endif
fprintf(stderr, "Warning: -t (initialize inode tables) is deprecated\n");
break;
case 'S':
-#ifndef USE_MINGW
+#ifndef _WIN32
seopts[0].value = optarg;
sehnd = selabel_open(SELABEL_CTX_FILE, seopts, 1);
if (!sehnd) {