summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/py_passdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index 9192ab3ce7..e23f47578e 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -25,6 +25,13 @@
#include "passdb.h"
#include "secrets.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