]> Sergey Matveev's repositories - bfs.git/blobdiff - src/xregex.c
bfstd: Add a thread-safe wrapper for strerror()
[bfs.git] / src / xregex.c
index 87b692ec0c408abafc67fae7f2196065fa4e27e5..3df27f0b1fe91042ec24706aa24dca91854f5255 100644 (file)
@@ -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