diff options
| author | Lukas Slebodnik <lslebodn@redhat.com> | 2017-01-02 08:19:39 +0100 |
|---|---|---|
| committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-01-02 12:33:58 +0100 |
| commit | 69fb159e1464ef91376f56e65afa9704d5bafad8 (patch) | |
| tree | db3986417ffc3071f6e241f9c991f91d3911820c /src/python/pysss.c | |
| parent | 50a6d01182aba430313746ba71c55e364bf9c6d6 (diff) | |
| download | sssd-69fb159e1464ef91376f56e65afa9704d5bafad8.tar.gz sssd-69fb159e1464ef91376f56e65afa9704d5bafad8.tar.xz sssd-69fb159e1464ef91376f56e65afa9704d5bafad8.zip | |
Fix compilation with python3.6
Autotools does not generate defines in conditional way (ifndef .. define)
and therefore it might happen that "defines" in config.h migt redefine
some macros in different way and generate a warning.
e.g.
In file included from /home/build/sssd/src/util/util.h:24:0,
from /home/build/sssd/src/python/pyhbac.c:24:
./config.h:322:0: error: "HAVE_LONG_LONG" redefined [-Werror]
#define HAVE_LONG_LONG 1
In file included from /usr/include/python3.6m/Python.h:50:0,
from /home/build/sssd/src/python/pyhbac.c:21:
/usr/include/python3.6m/pyport.h:42:0: note: this is the location of the previous definition
#define HAVE_LONG_LONG
We need to include config.h before Python.h to avoid redefinition of
HAVE_LONG_LONG which is definded conditionally in Python.h
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/python/pysss.c')
| -rw-r--r-- | src/python/pysss.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/python/pysss.c b/src/python/pysss.c index 6bd8f5a92..dc1c1ff1f 100644 --- a/src/python/pysss.c +++ b/src/python/pysss.c @@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" + #include <Python.h> #include <structmember.h> #include <talloc.h> |
