]> granicus.if.org Git - python/commitdiff
bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751)
authorziheng <zihenglv@gmail.com>
Mon, 24 Jun 2019 17:59:51 +0000 (01:59 +0800)
committerNed Deily <nad@python.org>
Mon, 24 Jun 2019 17:59:50 +0000 (13:59 -0400)
Misc/NEWS.d/next/Library/2019-02-03-19-13-08.bpo-32627.b68f64.rst [new file with mode: 0644]
Modules/_uuidmodule.c

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 (file)
index 0000000..16708aa
--- /dev/null
@@ -0,0 +1 @@
+Fix compile error when ``_uuid`` headers conflicting included.
index 0b7f2a2545d4ebeb354de751ccbb5caf9bd02030..0b7aa72e91a1c9cb5893eb7d988875f5a2029066 100644 (file)
@@ -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(PyObject *Py_UNUSED(context),
                            PyObject *Py_UNUSED(ignored))