aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/common.h b/common.h
index e5d9014..3062c14 100644
--- a/common.h
+++ b/common.h
@@ -3,7 +3,14 @@
#include <sys/stat.h>
+#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__)
#include <alloca.h>
+#elif defined(_WIN32)
+#include <malloc.h>
+#if !defined(alloca)
+#define alloca _alloca // for clang with MS Codegen
+#endif
+#endif
#include <errno.h>
#include <unistd.h>