aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-06-13 16:09:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-06-13 16:09:40 +0200
commitfcbf4c346c8a9b88679983614218e90a44fe8f2a (patch)
treed52ea04299badc27b5b4c08fb06ee3477a0899ec /lib/sqfs
parent54369da0d72232426d0ce07152cc76b2f8ddbc98 (diff)
Fix: don't include alloca.h on systems that don't provide this headerv1.0.0
This commit fixes a build issue on BSD based systems, where alloca is defined in stdlib.h and there is no such thing as "alloca.h". Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/write_inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c
index 787c4b5..8d8fa7a 100644
--- a/lib/sqfs/write_inode.c
+++ b/lib/sqfs/write_inode.c
@@ -14,13 +14,14 @@
#include "compat.h"
#include <string.h>
+#include <stdlib.h>
#if defined(_WIN32) || defined(__WINDOWS__)
# include <malloc.h>
# ifdef _MSC_VER
# define alloca _alloca
# endif
-#else
+#elif defined(HAVE_ALLOCA_H)
# include <alloca.h>
#endif