Skip to content

Commit 42bdfd3

Browse files
rlibbybehlendorf
authored andcommitted
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 <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ryan Libby <[email protected]> Closes #11331
1 parent 900480b commit 42bdfd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/libzfs/os/freebsd/libzfs_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ execvpe(const char *name, char * const argv[], char * const envp[])
178178

179179
#define ERRBUFLEN 256
180180

181-
__thread static char errbuf[ERRBUFLEN];
181+
static __thread char errbuf[ERRBUFLEN];
182182

183183
const char *
184184
libzfs_error_init(int error)

0 commit comments

Comments
 (0)