mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 02:19:26 +01:00
build: Support missing rawmemchr
This commit is contained in:
parent
40ad8be113
commit
fcdddf2b72
@ -128,6 +128,7 @@ AC_DEFINE_UNQUOTED(WIRED_STORAGEDIR, "${wired_storagedir}",
|
|||||||
[Directory for Ethernet daemon storage files])
|
[Directory for Ethernet daemon storage files])
|
||||||
|
|
||||||
AC_CHECK_FUNCS(explicit_bzero)
|
AC_CHECK_FUNCS(explicit_bzero)
|
||||||
|
AC_CHECK_FUNCS(rawmemchr)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
|
AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
|
||||||
|
|
||||||
|
@ -27,3 +27,13 @@ static inline void explicit_bzero(void *s, size_t n)
|
|||||||
__asm__ __volatile__ ("" : : "r"(s) : "memory");
|
__asm__ __volatile__ ("" : : "r"(s) : "memory");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_RAWMEMCHR
|
||||||
|
static inline void *rawmemchr(const void *s, int c)
|
||||||
|
{
|
||||||
|
_Pragma("GCC diagnostic push")
|
||||||
|
_Pragma("GCC diagnostic ignored \"-Wstringop-overflow=\"")
|
||||||
|
return memchr(s, c, (size_t) -1);
|
||||||
|
_Pragma("GCC diagnostic pop")
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "linux/nl80211.h"
|
#include "linux/nl80211.h"
|
||||||
|
|
||||||
|
#include "src/missing.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
#include "src/module.h"
|
#include "src/module.h"
|
||||||
#include "src/ie.h"
|
#include "src/ie.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user