From 6ffd9b05dfade9e3a101fe039157856eb855f82e Mon Sep 17 00:00:00 2001 From: ziheng Date: Tue, 25 Jun 2019 01:59:51 +0800 Subject: [PATCH] bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751) --- .../Library/2019-02-03-19-13-08.bpo-32627.b68f64.rst | 1 + Modules/_uuidmodule.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2019-02-03-19-13-08.bpo-32627.b68f64.rst 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 0b7f2a2545..0b7aa72e91 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(PyObject *Py_UNUSED(context), PyObject *Py_UNUSED(ignored)) -- 2.40.0