summaryrefslogtreecommitdiffstats
path: root/src/xregex.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-05 12:56:36 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-05 13:22:57 -0400
commit428cf9c206beee3407ea3c5480b00f4cfbea95f5 (patch)
treeb5abbb4ad7fc8ee450ea0abfdb7419ca89b8a8ca /src/xregex.c
parent634359bb169311646f6369b21f0c90a9819fe2ce (diff)
downloadbfs-428cf9c206beee3407ea3c5480b00f4cfbea95f5.tar.xz
bfstd: Add a thread-safe wrapper for strerror()
Diffstat (limited to 'src/xregex.c')
-rw-r--r--src/xregex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xregex.c b/src/xregex.c
index 87b692e..3df27f0 100644
--- a/src/xregex.c
+++ b/src/xregex.c
@@ -3,6 +3,7 @@
#include "xregex.h"
#include "alloc.h"
+#include "bfstd.h"
#include "config.h"
#include "diag.h"
#include "sanity.h"
@@ -274,7 +275,7 @@ void bfs_regfree(struct bfs_regex *regex) {
char *bfs_regerror(const struct bfs_regex *regex) {
if (!regex) {
- return strdup(strerror(ENOMEM));
+ return strdup(xstrerror(ENOMEM));
}
#if BFS_USE_ONIGURUMA