From 69bba3ea4e38283495dcc1c5a541964bb5175163 Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Tue, 15 Oct 2019 12:22:48 +0000 Subject: plugins/python: fix double _XOPEN_SOURCE definition ncursesw defines _XOPEN_SOURCE macro via command-line. In particular, it is defined in ncursesw.pc and extracted via pkg-config. From other side, Python defines the same macro unconditionally in pyconfig.h. Python-3.x defines the macro with value different than ncursesw does. In turn, this causes a warning that the macro is redefined. And warnings are treated as errors. Since both entities define the mecro unconditionally, we can't simply reorder headers as Python developers suggest. So, undefine the macro just before the to fix this silly issue. --- src/plugins/python_api.c | 1 + src/plugins/python_plugins.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c index ade24d05..b157cc62 100644 --- a/src/plugins/python_api.c +++ b/src/plugins/python_api.c @@ -32,6 +32,7 @@ * */ +#undef _XOPEN_SOURCE #include #include "config.h" diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c index a6339793..fa34053c 100644 --- a/src/plugins/python_plugins.c +++ b/src/plugins/python_plugins.c @@ -32,6 +32,7 @@ * */ +#undef _XOPEN_SOURCE #include #include "log.h" -- cgit 1.4.1-2-gfad0