X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ec0e5ac001843c24d58073447842c2b89b38bf96..106005004ec79d27c897a338a80eca8941208914:/lib/compat.c diff --git a/lib/compat.c b/lib/compat.c index e6e0e644..cabdc871 100644 --- a/lib/compat.c +++ b/lib/compat.c @@ -50,3 +50,29 @@ pid_t waitpid(pid_t pid, int *statptr, int options) } #endif + +#ifndef HAVE_MEMMOVE +void *memmove(void *dest, const void *src, size_t n) +{ + memcpy(dest, src, n); + return dest; +} +#endif + +#ifndef HAVE_STRPBRK +/* Find the first ocurrence in S of any character in ACCEPT. + derived from glibc +*/ +char *strpbrk(const char *s, const char *accept) +{ + while (*s != '\0') { + const char *a = accept; + while (*a != '\0') { + if (*a++ == *s) return (char *)s; + } + ++s; + } + + return NULL; +} +#endif