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 <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ryan Libby <rlibby@FreeBSD.org>
Closes #11331
This commit is contained in:
Ryan Libby 2020-12-14 09:28:24 -08:00 committed by GitHub
parent 923d730329
commit c7500ded3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)