summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-06-24 11:18:22 -0700
committerNed Deily <nad@python.org>2019-07-01 22:19:49 -0400
commite90815b3b16ab196c10f3a4dd91402cdc2e07d06 (patch)
tree670ec07e5f0a492bf285bb228b25bf1b1476662e
parent9ad5e9edea08b0d377902d556624f03a2b8bb29b (diff)
downloadcpython-git-e90815b3b16ab196c10f3a4dd91402cdc2e07d06.tar.gz
bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751)
(cherry picked from commit 6ffd9b05dfade9e3a101fe039157856eb855f82e) Co-authored-by: ziheng <zihenglv@gmail.com>
-rw-r--r--Misc/NEWS.d/next/Library/2019-02-03-19-13-08.bpo-32627.b68f64.rst1
-rw-r--r--Modules/_uuidmodule.c9
2 files changed, 7 insertions, 3 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-02-03-19-13-08.bpo-32627.b68f64.rst b/Misc/NEWS.d/next/Library/2019-02-03-19-13-08.bpo-32627.b68f64.rst
new file mode 100644
index 0000000000..16708aa5ee
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-02-03-19-13-08.bpo-32627.b68f64.rst
@@ -0,0 +1 @@
+Fix compile error when ``_uuid`` headers conflicting included.
diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c
index 89499143a6..9e2589d896 100644
--- a/Modules/_uuidmodule.c
+++ b/Modules/_uuidmodule.c
@@ -1,14 +1,17 @@
+/*
+ * Python UUID module that wraps libuuid -
+ * DCE compatible Universally Unique Identifier library.
+ */
+
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifdef HAVE_UUID_UUID_H
#include <uuid/uuid.h>
-#endif
-#ifdef HAVE_UUID_H
+#elif defined(HAVE_UUID_H)
#include <uuid.h>
#endif
-
static PyObject *
py_uuid_generate_time_safe(void)
{