compositor: add fallback strchrnul()
Android does not have this function. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
b79b635312
commit
b7a9498a8e
@@ -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
|
||||
|
||||
@@ -46,4 +46,9 @@ os_epoll_create_cloexec(void);
|
||||
int
|
||||
os_create_anonymous_file(off_t size);
|
||||
|
||||
#ifndef HAVE_STRCHRNUL
|
||||
char *
|
||||
strchrnul(const char *s, int c);
|
||||
#endif
|
||||
|
||||
#endif /* OS_COMPATIBILITY_H */
|
||||
|
||||
Reference in New Issue
Block a user