[rtems-libbsd commit] libkern.h: Avoid call overhead for bcmp()
Sebastian Huber
sebh at rtems.org
Thu Aug 9 05:59:49 UTC 2018
Module: rtems-libbsd
Branch: master
Commit: 1d99262f59e5b7427e926ed045610a1c049be337
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=1d99262f59e5b7427e926ed045610a1c049be337
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Aug 9 07:20:08 2018 +0200
libkern.h: Avoid call overhead for bcmp()
---
freebsd/sys/sys/libkern.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/freebsd/sys/sys/libkern.h b/freebsd/sys/sys/libkern.h
index 416ffa7..b7c1d5d 100644
--- a/freebsd/sys/sys/libkern.h
+++ b/freebsd/sys/sys/libkern.h
@@ -136,7 +136,11 @@ arc4rand(void *ptr, u_int len, int reseed)
arc4random_buf(ptr, len);
}
#endif /* __rtems__ */
+#ifndef __rtems__
int bcmp(const void *, const void *, size_t);
+#else /* __rtems__ */
+#define bcmp(m1, m2, n) memcmp(m1, m2, n)
+#endif /* __rtems__ */
int timingsafe_bcmp(const void *, const void *, size_t);
void *bsearch(const void *, const void *, size_t,
size_t, int (*)(const void *, const void *));
More information about the vc
mailing list