Merge commit c7500ded3 from openzfs git (by Ryan Libby):

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-27 14:33:13 -08:00
parent e67d933d9c
commit 48184e7661

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)