From c7500ded3e2616ee797dad8db56da93619bbf75c Mon Sep 17 00:00:00 2001 From: Ryan Libby Date: Mon, 14 Dec 2020 09:28:24 -0800 Subject: [PATCH] FreeBSD libzfs: gcc requires __thread after static Building libzfs with gcc on FreeBSD failed because gcc is picky about the order of keywords in declarations with __thread, whereas clang is more relaxed. https://gcc.gnu.org/onlinedocs/gcc/Thread-Local.html Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Signed-off-by: Ryan Libby Closes #11331 --- lib/libzfs/os/freebsd/libzfs_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/os/freebsd/libzfs_compat.c b/lib/libzfs/os/freebsd/libzfs_compat.c index 2de90c7ce..0e8a3b121 100644 --- a/lib/libzfs/os/freebsd/libzfs_compat.c +++ b/lib/libzfs/os/freebsd/libzfs_compat.c @@ -178,7 +178,7 @@ execvpe(const char *name, char * const argv[], char * const envp[]) #define ERRBUFLEN 256 -__thread static char errbuf[ERRBUFLEN]; +static __thread char errbuf[ERRBUFLEN]; const char * libzfs_error_init(int error)