summaryrefslogtreecommitdiff
path: root/xs_regex.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-05-25 08:24:08 +0200
committerdefault <nobody@localhost>2024-05-25 08:24:08 +0200
commita2920800007c291bdf2b5264622cbc713d4961ee (patch)
tree9fb1b2b89e0bfbb4b8bf1e85d840c8653e646bb7 /xs_regex.h
parentf631fc5ed22cb49d9d9f6a481f4a5d227c180246 (diff)
Backport from xs (fix regex.h compilation with tcc).
Diffstat (limited to 'xs_regex.h')
-rw-r--r--xs_regex.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/xs_regex.h b/xs_regex.h
index cdb2cf8..d8d2d1d 100644
--- a/xs_regex.h
+++ b/xs_regex.h
@@ -16,6 +16,11 @@ xs_list *xs_regex_replace_in(xs_str *str, const char *rx, const char *rep, int c
#ifdef XS_IMPLEMENTATION
+#ifdef __TINYC__
+/* fix a compilation error in tcc */
+#define _REGEX_NELTS(n)
+#endif
+
#include <regex.h>
xs_list *xs_regex_split_n(const char *str, const char *rx, int count)