summaryrefslogtreecommitdiff
path: root/lib/sqfs/write_inode.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-01 21:53:05 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-01 21:53:05 +0100
commiteedb0793a2b2600c3bc213ddb869337fb09959de (patch)
treec7915972162e1565af7d1b4206d9d21e66b701b2 /lib/sqfs/write_inode.c
parentf4ca30a3a901a33ab29d2df80e9bc3649385f699 (diff)
Fix alloca in write_inode.c for windows build
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/write_inode.c')
-rw-r--r--lib/sqfs/write_inode.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c
index 86ed146..787c4b5 100644
--- a/lib/sqfs/write_inode.c
+++ b/lib/sqfs/write_inode.c
@@ -14,7 +14,15 @@
#include "compat.h"
#include <string.h>
-#include <alloca.h>
+
+#if defined(_WIN32) || defined(__WINDOWS__)
+# include <malloc.h>
+# ifdef _MSC_VER
+# define alloca _alloca
+# endif
+#else
+# include <alloca.h>
+#endif
static int write_block_sizes(sqfs_meta_writer_t *ir,
const sqfs_inode_generic_t *n)