aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/compat.h')
-rw-r--r--include/asterisk/compat.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h
index 838e24e47..7e019e064 100644
--- a/include/asterisk/compat.h
+++ b/include/asterisk/compat.h
@@ -11,16 +11,49 @@
/*! \file
* \brief General Definitions for Asterisk top level program
+ * Included by asterisk.h to handle platform-specific issues
+ * especially those related to header files.
*/
#ifndef _COMPAT_H
#define _COMPAT_H
-#include "asterisk/autoconfig.h"
+#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+
#include <stdarg.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h> /* not necessarily present - could be in stdlib */
+#endif
+
+#include <stdio.h> /* this is always present */
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
#if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
int asprintf(char **str, const char *fmt, ...);
#endif