summaryrefslogtreecommitdiff
path: root/shared/os-compatibility.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/os-compatibility.c')
-rw-r--r--shared/os-compatibility.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c
index 66934a8c..21d4d029 100644
--- a/shared/os-compatibility.c
+++ b/shared/os-compatibility.c
@@ -168,3 +168,13 @@ os_create_anonymous_file(off_t size)
return fd;
}
+
+#ifndef HAVE_STRCHRNUL
+char *
+strchrnul(const char *s, int c)
+{
+ while (*s && *s != c)
+ s++;
+ return (char *)s;
+}
+#endif