[issue32399] _uuidmodule.c cannot build on AIX - different typedefs of uuid_t, etc..
Michael Felt
report at bugs.python.org
Thu Dec 21 14:13:40 EST 2017
Michael Felt <michael at felt.demon.nl> added the comment:
So - KISS principle:
This diff shows what can compile:
diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c
index d4bc3c7..5550705 100644
--- a/Modules/_uuidmodule.c
+++ b/Modules/_uuidmodule.c
@@ -1,7 +1,11 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#ifndef _AIX
#include <uuid/uuid.h>
+#else
+#include <uuid.h>
+#endif
static PyObject *
@@ -16,7 +20,11 @@ py_uuid_generate_time_safe(void)
#else
uuid_t out;
uuid_generate_time(out);
+#ifndef _AIX
return Py_BuildValue("y#O", (const char *) out, sizeof(out), Py_None);
+#else
+ return Py_BuildValue("y#O", (const char *) &out, sizeof(out), Py_None);
+#endif
#endif
}
However, no uuid_generate_time(). So, ends with:
ld: 0711-317 ERROR: Undefined symbol: .uuid_generate_time
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32399>
_______________________________________
More information about the Python-bugs-list
mailing list