From 38c5382e3f7e02ad3669c8d4a0a37d86e4868e9d Mon Sep 17 00:00:00 2001 From: Brendan Heading Date: Wed, 29 Jul 2015 19:37:37 +0100 Subject: 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 Signed-off-by: David Sterba --- cmds-inspect.c | 1 + cmds-receive.c | 1 + cmds-scrub.c | 1 + cmds-send.c | 1 + kerncompat.h | 2 ++ 5 files changed, 6 insertions(+) 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 #include #include +#include #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 #include #include +#include #include #include 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 #include #include +#include #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 #include #include +#include #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 #ifndef __GLIBC__ +#ifndef BTRFS_DISABLE_BACKTRACE #define BTRFS_DISABLE_BACKTRACE +#endif #define __always_inline __inline __attribute__ ((__always_inline__)) #endif -- cgit v1.2.3