summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-11-08 20:09:16 (GMT)
committerGitHub <noreply@github.com>2017-11-08 20:09:16 (GMT)
commit9a10ff4deb2494e22bc0dbea3e3a6f9e8354d995 (patch)
treed860e1b145cf9e9e144ada162d731bb5ea78108d /Modules
parentbf9d317626eebcf79bd0756b4dd43df82d5cc186 (diff)
downloadcpython-9a10ff4deb2494e22bc0dbea3e3a6f9e8354d995.zip
cpython-9a10ff4deb2494e22bc0dbea3e3a6f9e8354d995.tar.gz
cpython-9a10ff4deb2494e22bc0dbea3e3a6f9e8354d995.tar.bz2
bpo-11063: Add a configure check for uuid_generate_time_safe (GH-4287)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_uuidmodule.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c
index 88c40ce..d4bc3c7 100644
--- a/Modules/_uuidmodule.c
+++ b/Modules/_uuidmodule.c
@@ -4,17 +4,10 @@
#include <uuid/uuid.h>
-/* bpo-11063: libuuid on macOS doesn't provide uuid_generate_time_safe(),
- only uuid_generate_time(). */
-#ifndef __APPLE__
-# define HAVE_TIME_SAFE
-#endif
-
-
static PyObject *
py_uuid_generate_time_safe(void)
{
-#ifdef HAVE_TIME_SAFE
+#ifdef HAVE_UUID_GENERATE_TIME_SAFE
uuid_t out;
int res;
@@ -45,7 +38,7 @@ PyInit__uuid(void)
{
PyObject *mod;
assert(sizeof(uuid_t) == 16);
-#ifdef HAVE_TIME_SAFE
+#ifdef HAVE_UUID_GENERATE_TIME_SAFE
int has_uuid_generate_time_safe = 1;
#else
int has_uuid_generate_time_safe = 0;