mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 21:53:12 +00:00
Define bcmp() using memcmp() on systems lacking native bcmp()
See 1e61e7a02f
for equivalent changes
for bzero() and bcopy()
This commit is contained in:
parent
628fba6208
commit
f8386d5aed
@ -69,8 +69,7 @@ AC_CHECK_LIB(c,srandomdev)
|
||||
dnl Solaris hides nanosleep here
|
||||
AC_CHECK_LIB(rt,nanosleep)
|
||||
|
||||
dnl BSD way of getting socket creds
|
||||
AC_CHECK_FUNCS([getpeereid bcopy bzero])
|
||||
AC_CHECK_FUNCS([getpeereid bcopy bzero bcmp])
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
stdio.h \
|
||||
|
6
os.h
6
os.h
@ -69,6 +69,12 @@ __SERVALDNA_OS_INLINE void bcopy(void *src, void *dst, size_t len) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_BCMP
|
||||
__SERVALDNA_OS_INLINE int bcmp(const void *s1, const void *s2) {
|
||||
return memcmp(s1, s2);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The "e" variants log the error before returning -1.
|
||||
*/
|
||||
int mkdirs(const char *path, mode_t mode);
|
||||
|
Loading…
Reference in New Issue
Block a user