summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-03-04 17:12:24 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-06-03 13:43:46 +0200
commit093285313c7e3d69069ea0d4637f7fee00fb2a2e (patch)
tree152eef097a8e4c682662081c416757d9b93011a4 /src
parent1659171ed9585201df90003559884e070bd9cb69 (diff)
downloadsssd-093285313c7e3d69069ea0d4637f7fee00fb2a2e.tar.gz
sssd-093285313c7e3d69069ea0d4637f7fee00fb2a2e.tar.xz
sssd-093285313c7e3d69069ea0d4637f7fee00fb2a2e.zip
UTIL: Fix order of header files.
The older version of glibc and different implementations of libs requires feature macros for enabling function getline. getline(), getdelim(): Since glibc 2.10: _POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 Before glibc 2.10: _GNU_SOURCE All feature macros are in header file config.h and are detected by configure script. The header file config.h was included after few other header files. The problem is that header files stdio.h is included just once and is included from many external header files. We need to include config.h before any other header file to prevent problems. src/util/nscd.c: In function ‘sss_nscd_parse_conf’: src/util/nscd.c:150: error: implicit declaration of function ‘getline’ Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> (cherry picked from commit b3007e32fa5d6b722f3aaaf9fe7593103cb443c3)
Diffstat (limited to 'src')
-rw-r--r--src/util/nscd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/nscd.c b/src/util/nscd.c
index 29f48ae43..9f79a69cb 100644
--- a/src/util/nscd.c
+++ b/src/util/nscd.c
@@ -19,12 +19,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
+#include <stdio.h>
#include <talloc.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include "config.h"
#include "util/util.h"
#include "tools/tools_util.h"