diff options
author | José Luis Salvador Rufo <[email protected]> | 2021-02-17 06:51:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-16 21:51:46 -0800 |
commit | aef1830f932c3499cb5430b4c1bd9d21f87808f3 (patch) | |
tree | 75ae5a5d52d913daa643d06d46499c7ffa2f6f28 /cmd/ztest | |
parent | 436ab35a53bad83c3dc4b8f1dc2b6ad00bd5e9ec (diff) |
Support uClibc for the tests compilations
There are two issues that don't allow ZFS to be compiled using uClibc.
`backtrace()`, and `program_invocation_short_name` as a `const`.
This patch adds uClibc to the conditionals in the same way there are
already for Glibc for `backtrace()`; and removes the external param
`program_invocation_short_name` because its only used here for the
whole project.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: José Luis Salvador Rufo <[email protected]>
Closes #11600
Diffstat (limited to 'cmd/ztest')
-rw-r--r-- | cmd/ztest/ztest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index ab20a635d..d2bf01019 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -133,7 +133,7 @@ #include <libnvpair.h> #include <libzutil.h> #include <sys/crypto/icp.h> -#ifdef __GLIBC__ +#if (__GLIBC__ && !__UCLIBC__) #include <execinfo.h> /* for backtrace() */ #endif @@ -563,7 +563,7 @@ dump_debug_buffer(void) static void sig_handler(int signo) { struct sigaction action; -#ifdef __GLIBC__ /* backtrace() is a GNU extension */ +#if (__GLIBC__ && !__UCLIBC__) /* backtrace() is a GNU extension */ int nptrs; void *buffer[BACKTRACE_SZ]; |