summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_operators.h5
-rw-r--r--configure.in1
2 files changed, 6 insertions, 0 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 1bf25ee93e..7be7b77596 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -25,6 +25,7 @@
#include <errno.h>
#include <math.h>
#include <assert.h>
+#include <string.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
@@ -239,6 +240,9 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
return NULL;
}
+#ifdef HAVE_MEMRCHR
+# define zend_memrchr(s,c,n) memrchr(s,c,n)
+#else
static inline void *zend_memrchr(const void *s, int c, size_t n)
{
register unsigned char *e;
@@ -255,6 +259,7 @@ static inline void *zend_memrchr(const void *s, int c, size_t n)
return NULL;
}
+#endif
BEGIN_EXTERN_C()
ZEND_API int increment_function(zval *op1);
diff --git a/configure.in b/configure.in
index e5dff11c71..2c74e09935 100644
--- a/configure.in
+++ b/configure.in
@@ -515,6 +515,7 @@ lchown \
lrand48 \
memcpy \
memmove \
+memrchr \
mkstemp \
mmap \
nl_langinfo \