diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-03-01 21:53:05 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-03-01 21:53:05 +0100 |
commit | eedb0793a2b2600c3bc213ddb869337fb09959de (patch) | |
tree | c7915972162e1565af7d1b4206d9d21e66b701b2 /lib | |
parent | f4ca30a3a901a33ab29d2df80e9bc3649385f699 (diff) |
Fix alloca in write_inode.c for windows build
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sqfs/write_inode.c | 10 |
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) |