Port 5b607cd8c71b (closes #11892)
diff --git a/Include/pyport.h b/Include/pyport.h
index 13396a2..17a5379 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -279,6 +279,10 @@
 
 #include <stdlib.h>
 
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>  /* needed for 'finite' declaration on some platforms */
+#endif
+
 #include <math.h> /* Moved here from the math section, before extern "C" */
 
 /********************************************