]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 24 Jun 2019 18:18:22 +0000 (11:18 -0700)
committerNed Deily <nad@python.org>
Tue, 2 Jul 2019 02:19:49 +0000 (22:19 -0400)
(cherry picked from commit 6ffd9b05dfade9e3a101fe039157856eb855f82e)

Co-authored-by: ziheng <zihenglv@gmail.com>
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 89499143a61b2b9b61374b2ee9ad7d4d8f086e47..9e2589d89636a4f42a61f3a970c55a3639c591db 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(void)
 {