about summary refs log tree commit diff
path: root/posix/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/regex.c')
-rw-r--r--posix/regex.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/posix/regex.c b/posix/regex.c
index 507ac86545..4c66337a24 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -170,6 +170,14 @@ char *realloc ();
 # endif
 
 #endif /* not emacs */
+
+#if defined _LIBC || HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#ifndef MB_LEN_MAX
+# define MB_LEN_MAX 1
+#endif
 
 /* Get the interface, including the syntax bits.  */
 #include <regex.h>