diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-10-05 12:56:36 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-10-05 13:22:57 -0400 |
commit | 428cf9c206beee3407ea3c5480b00f4cfbea95f5 (patch) | |
tree | b5abbb4ad7fc8ee450ea0abfdb7419ca89b8a8ca /src/thread.h | |
parent | 634359bb169311646f6369b21f0c90a9819fe2ce (diff) | |
download | bfs-428cf9c206beee3407ea3c5480b00f4cfbea95f5.tar.xz |
bfstd: Add a thread-safe wrapper for strerror()
Diffstat (limited to 'src/thread.h')
-rw-r--r-- | src/thread.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/thread.h b/src/thread.h index ab95a79..a59033c 100644 --- a/src/thread.h +++ b/src/thread.h @@ -8,6 +8,7 @@ #ifndef BFS_THREAD_H #define BFS_THREAD_H +#include "bfstd.h" #include "config.h" #include "diag.h" #include <errno.h> @@ -23,7 +24,7 @@ #endif #define thread_verify(expr, cond) \ - bfs_verify((errno = (expr), (cond)), "%s: %s", #expr, strerror(errno)) + bfs_verify((errno = (expr), (cond)), "%s: %s", #expr, xstrerror(errno)) /** * Wrapper for pthread_create(). |