From 559fd77ddac907da598202c23f103fc940f15ff8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 18 Mar 2016 11:49:26 +0100 Subject: Add timingsafe_bcmp() This function is used by LibreSSL and OpenSSH and is provided by the OpenBSD libc. * libc/include/string.h (timingsafe_bcmp): Declare. * libc/string/timingsafe_bcmp.c: New file. * libc/string/Makefile.am: Add new file. * libc/string/Makefile.in: Regenerate. --- newlib/libc/include/string.h | 1 + 1 file changed, 1 insertion(+) (limited to 'newlib/libc/include/string.h') diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h index c43106b33..2bda8f952 100644 --- a/newlib/libc/include/string.h +++ b/newlib/libc/include/string.h @@ -53,6 +53,7 @@ void _EXFUN(bzero,(void *, size_t)); #endif #if __BSD_VISIBLE void _EXFUN(explicit_bzero,(void *, size_t)); +int _EXFUN(timingsafe_bcmp,(const void *, const void *, size_t)); #endif #if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 int _EXFUN(ffs,(int)); -- cgit v1.2.3