diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h
index ad4cfc61602a1f4b3a804d3f28c8ba90a16468f6..e02d3c7c138628d80b6bf0821d52dad8fecac771 100644
--- a/include/asterisk/compat.h
+++ b/include/asterisk/compat.h
@@ -16,6 +16,7 @@
 #ifndef _COMPAT_H
 #define _COMPAT_H
 
+#include "asterisk/autoconfig.h"
 #include <inttypes.h>
 #include <sys/types.h>
 #include <stdarg.h>