bdev: include own getline function in bdev.h

Fixes android build error:

bdev/bdev.c: In function 'detect_fs':
bdev/bdev.c:686:2: error: implicit declaration of function 'getline' [-Werror=implicit-function-declaration]
  while (getline(&line, &linelen, f) != -1) {
  ^

Signed-off-by: Christian Brauner <cbrauner@suse.de>
This commit is contained in:
Christian Brauner 2016-07-27 18:07:34 +02:00
parent 813d7f1453
commit 8c2e2e8f53
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -33,6 +33,13 @@
#include "config.h"
/* Define getline() if missing from the C library */
#ifndef HAVE_GETLINE
#ifdef HAVE_FGETLN
#include <../../include/getline.h>
#endif
#endif
/* define constants if the kernel/glibc headers don't define them */
#ifndef MS_DIRSYNC
#define MS_DIRSYNC 128