btrfs-progs: compilation errors when using musl libc

- limits.h must be included to pick up PATH_MAX.
- remove double declaration of BTRFS_DISABLE_BACKTRACE

kerncompat.h assumed that if __GLIBC__ was not defined,
it could safely define BTRFS_DISABLE_BACKTRACE, however this can be
defined by the configure script. Added a check to ensure it is not
defined first.

Signed-off-by: Brendan Heading <brendanheading@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Brendan Heading 2015-07-29 19:37:37 +01:00 committed by David Sterba
parent 6936aa4c43
commit 38c5382e3f
5 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include <sys/ioctl.h>
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include "kerncompat.h"
#include "ioctl.h"

View File

@ -28,6 +28,7 @@
#include <wait.h>
#include <assert.h>
#include <getopt.h>
#include <limits.h>
#include <sys/stat.h>
#include <sys/types.h>

View File

@ -34,6 +34,7 @@
#include <ctype.h>
#include <signal.h>
#include <stdarg.h>
#include <limits.h>
#include "ctree.h"
#include "ioctl.h"

View File

@ -33,6 +33,7 @@
#include <assert.h>
#include <getopt.h>
#include <uuid/uuid.h>
#include <limits.h>
#include "ctree.h"
#include "ioctl.h"

View File

@ -33,7 +33,9 @@
#include <features.h>
#ifndef __GLIBC__
#ifndef BTRFS_DISABLE_BACKTRACE
#define BTRFS_DISABLE_BACKTRACE
#endif
#define __always_inline __inline __attribute__ ((__always_inline__))
#endif