btrfs-progs: compilation errors when using musl libc
PATCH 1/1 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 <[email protected]>
--- cmds-inspect.c | 1 + cmds-receive.c | 1 + cmds-scrub.c | 1 + cmds-send.c | 1 + kerncompat.h | 2 ++ 5 files changed, 6 insertions(+)
cmds-inspect.c +1 -0
@@ -20,6 +20,7 @@#include <stdint.h> #include <sys/ioctl.h> #include <errno.h> +#include <limits.h> #include "kerncompat.h" #include "ioctl.h"
cmds-receive.c +1 -0
@@ -28,6 +28,7 @@#include <wait.h> #include <assert.h> #include <getopt.h> +#include <limits.h> #include <sys/stat.h> #include <sys/types.h>
cmds-scrub.c +1 -0
@@ -34,6 +34,7 @@#include <ctype.h> #include <signal.h> #include <stdarg.h> +#include <limits.h> #include "ctree.h" #include "ioctl.h"
cmds-send.c +1 -0
@@ -33,6 +33,7 @@#include <assert.h> #include <getopt.h> #include <uuid/uuid.h> +#include <limits.h> #include "ctree.h" #include "ioctl.h"
kerncompat.h +2 -0
@@ -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
Signature · 1 line
2.4.3
Quoted 9 lines · Brendan Heading
-
limits.hmust be included to pick upPATH_MAX.
- remove double declaration ofBTRFS_DISABLE_BACKTRACE
kerncompat.hassumed that if__GLIBC__was not defined, it could safely defineBTRFS_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 <[email protected]>
Applied, thanks.