ehlo,
The older versions 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.
LS
>From b0b9373b7badb6d4660a5a45eb562d84ea028960 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <[email protected]>
Date: Tue, 4 Mar 2014 17:12:24 +0100
Subject: [PATCH 4/6] UTIL: Fix order of header files.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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’
---
src/util/nscd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/util/nscd.c b/src/util/nscd.c
index
29f48ae435b4518030756bae9a80dd015ed294c3..9f79a69cb5e0fe9674ace191fc90d448cfdf602a
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"
--
1.9.3
_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel