/* SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0 */ #ifdef HAVE_LIBSELINUX #include #include #endif #ifdef WITH_ANDROID #include #include #include #include #endif #ifndef HAVE_MEMRCHR static inline void *memrchr(const void *s, int c, size_t n) { const unsigned char *p = (const unsigned char *)s; for (p += n; n > 0; n--) if (*--p == c) return (void*)p; return NULL; } #endif