summaryrefslogtreecommitdiffstats
path: root/src/util/sss_python.h
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2017-01-02 08:19:39 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2017-01-02 12:33:58 +0100
commit69fb159e1464ef91376f56e65afa9704d5bafad8 (patch)
treedb3986417ffc3071f6e241f9c991f91d3911820c /src/util/sss_python.h
parent50a6d01182aba430313746ba71c55e364bf9c6d6 (diff)
downloadsssd-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/util/sss_python.h')
-rw-r--r--src/util/sss_python.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/sss_python.h b/src/util/sss_python.h
index b3fdaad64..26ecd71bd 100644
--- a/src/util/sss_python.h
+++ b/src/util/sss_python.h
@@ -1,8 +1,11 @@
#ifndef __SSS_PYTHON_H__
#define __SSS_PYTHON_H__
+#include "config.h"
+
#include <Python.h>
#include <stdbool.h>
+
#include "util/util.h"
#if PY_VERSION_HEX < 0x02050000