summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Heading <brendanheading@gmail.com>2015-07-29 19:37:37 +0100
committerDavid Sterba <dsterba@suse.com>2015-08-31 19:25:11 +0200
commit38c5382e3f7e02ad3669c8d4a0a37d86e4868e9d (patch)
tree70d319303ee5a8d98214e75742736d7775a416d7
parent6936aa4c4301478aac273059c73d79d557d7774a (diff)
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>
-rw-r--r--cmds-inspect.c1
-rw-r--r--cmds-receive.c1
-rw-r--r--cmds-scrub.c1
-rw-r--r--cmds-send.c1
-rw-r--r--kerncompat.h2
5 files changed, 6 insertions, 0 deletions
diff --git a/cmds-inspect.c b/cmds-inspect.c
index 56da09f9..fc3db990 100644
--- a/cmds-inspect.c
+++ b/cmds-inspect.c
@@ -21,6 +21,7 @@
#include <sys/ioctl.h>
#include <errno.h>
#include <getopt.h>
+#include <limits.h>
#include "kerncompat.h"
#include "ioctl.h"
diff --git a/cmds-receive.c b/cmds-receive.c
index 071bea95..d4b31033 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -28,6 +28,7 @@
#include <wait.h>
#include <assert.h>
#include <getopt.h>
+#include <limits.h>
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/cmds-scrub.c b/cmds-scrub.c
index b7aa8091..5a85dc47 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -34,6 +34,7 @@
#include <ctype.h>
#include <signal.h>
#include <stdarg.h>
+#include <limits.h>
#include "ctree.h"
#include "ioctl.h"
diff --git a/cmds-send.c b/cmds-send.c
index 20bba18e..a0b7f95f 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -33,6 +33,7 @@
#include <assert.h>
#include <getopt.h>
#include <uuid/uuid.h>
+#include <limits.h>
#include "ctree.h"
#include "ioctl.h"
diff --git a/kerncompat.h b/kerncompat.h
index 5d928565..7c627ba3 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -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