diff --git a/ChangeLog b/ChangeLog
index 045906116ab731d1d6363d2cb9c3778699dcf587..190545f9960e507ba693ce7a0c538ad0712f9cef 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-11  Kevin P. Fleming  <kpfleming@digium.com>
+
+	* channels/chan_iax2.c: ensure that system headers that provide basic types are included first (issue #5713)
+
 2005-11-11  Russell Bryant  <russell@digium.com>
 
 	* many files in apps/: Clean up application descriptions. Clarify some wording and make sure they wrap at 80 characters.
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index c6df0fd3dfc2480d650851956784286b5b1f81d7..bf363848b46af9fe7ca83badeb337e7b27f3838a 100755
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -26,6 +26,9 @@
  * \ingroup channel_drivers
  */
 
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
 #include <sys/mman.h>
 #include <arpa/inet.h>
 #include <dirent.h>
@@ -36,14 +39,11 @@
 #include <sys/time.h>
 #include <sys/signal.h>
 #include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
 #include <netdb.h>
 #include <fcntl.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <regex.h>
 #ifdef IAX_TRUNKING