diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h
index 0dd3685d61c2489a36c23f95808f002aca3fc502..a9f032b3439b1650ad6a74598379b644a13b0f71 100644
--- a/include/asterisk/compat.h
+++ b/include/asterisk/compat.h
@@ -52,14 +52,9 @@
 #endif
 
 #ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#elif defined(__GNUC__)
-#define alloca __builtin_alloca
-#elif defined(_AIX)
-#define alloca __alloca
-#elif defined(_MSC_VER)
-#include <malloc.h>
-#define alloca _alloca
+#include <alloca.h>    /* not necessarily present - could be in stdlib */
+#elif defined(HAVE_ALLOCA)
+#include <malloc.h>    /* see if it is here... */
 #endif
 
 #include <stdio.h>	/* this is always present */