summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/socket_wrapper/py_socket_wrapper.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/socket_wrapper/py_socket_wrapper.c b/lib/socket_wrapper/py_socket_wrapper.c
index 405a43a81d..5c8af03124 100644
--- a/lib/socket_wrapper/py_socket_wrapper.c
+++ b/lib/socket_wrapper/py_socket_wrapper.c
@@ -45,6 +45,13 @@
#include "system/network.h"
#include "socket_wrapper.h"
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+#endif
+
#ifndef Py_RETURN_NONE
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif