]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Include config.h early for _GNU_SOURCE with uClibc
authorNatanael Copa <ncopa@alpinelinux.org>
Wed, 29 Jan 2014 14:23:50 +0000 (14:23 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 29 Jan 2014 16:15:52 +0000 (16:15 +0000)
This fixes the following compile errors with uClibc:

lxc_snapshot.c: In function 'print_file':
lxc_snapshot.c:71:2: error: implicit declaration of function 'getline' [-Werror=implicit-function-declaration]
  while (getline(&line, &sz, f) != -1) {
  ^
cc1: all warnings being treated as errors

lxc_usernsexec.c: In function 'read_default_map':
lxc_usernsexec.c:181:2: error: implicit declaration of function 'getline' [-Werror=implicit-function-declaration]
  while (getline(&line, &sz, fin) != -1) {
  ^
cc1: all warnings being treated as errors

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_snapshot.c
src/lxc/lxc_usernsexec.c

index 9a8f6a443fae145e557d0a2589ecb76274c265cc..a49e8d737d943e8022086aec93ce4fc864b1964d 100644 (file)
@@ -16,6 +16,7 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
+#include "config.h"
 
 #include <stdio.h>
 #include <libgen.h>
index 83357259d8e1bb5dc76e9bd8127a5807ad47c936..b82bcf8dac2caaeb193f7a41f70adb0c6ef0e3c9 100644 (file)
@@ -21,6 +21,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+#include "config.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -39,7 +40,6 @@
 #include <pwd.h>
 #include <grp.h>
 
-#include "config.h"
 #include "namespace.h"
 #include "utils.h"