From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 24 Jun 2019 18:18:22 +0000 (-0700) Subject: bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751) X-Git-Tag: v3.7.5rc1~309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=742b16edd692f58a06e0d55bedfffb77a112b205;p=thirdparty%2FPython%2Fcpython.git bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751) (cherry picked from commit 6ffd9b05dfade9e3a101fe039157856eb855f82e) Co-authored-by: ziheng --- 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 000000000000..16708aa5ee54 --- /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 89499143a61b..9e2589d89636 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 -#endif -#ifdef HAVE_UUID_H +#elif defined(HAVE_UUID_H) #include #endif - static PyObject * py_uuid_generate_time_safe(void) {