diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-04-01 00:13:11 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-04-01 18:31:04 +0200 |
commit | a2495bd1ac9e5e54074d65616de0efa822a6309e (patch) | |
tree | e8a186b06bb4a94faafd7826b1ddc7c65112e824 /lib/sqfs/comp | |
parent | b3f2636f44eea1a8b6fbf892d2daa611cff9d4af (diff) |
Add preliminary VisualStudio support
- Mostly workarounds/clutches in compat.h
- Change getline return type to int
- Replace C99 style flexible array with alloca
- Add all the MSVC solution/project crap
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/comp')
-rw-r--r-- | lib/sqfs/comp/compressor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqfs/comp/compressor.c b/lib/sqfs/comp/compressor.c index 946ee25..2294b98 100644 --- a/lib/sqfs/comp/compressor.c +++ b/lib/sqfs/comp/compressor.c @@ -42,7 +42,7 @@ static const char *names[] = { int sqfs_generic_write_options(sqfs_file_t *file, const void *data, size_t size) { - sqfs_u8 buffer[size + 2]; + sqfs_u8 *buffer = alloca(size + 2); int ret; *((sqfs_u16 *)buffer) = htole16(0x8000 | size); @@ -58,7 +58,7 @@ int sqfs_generic_write_options(sqfs_file_t *file, const void *data, size_t size) int sqfs_generic_read_options(sqfs_file_t *file, void *data, size_t size) { - sqfs_u8 buffer[size + 2]; + sqfs_u8 *buffer = alloca(size + 2); int ret; ret = file->read_at(file, sizeof(sqfs_super_t), |