Add <errno.h>.
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index e811088..e45e64f 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -2,6 +2,11 @@
 
 #include "allobjects.h"
 
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
 #include "modsupport.h"
 
 #include <math.h>