summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authormatteo <matteo@FreeBSD.org>2008-02-05 08:07:19 +0000
committermatteo <matteo@FreeBSD.org>2008-02-05 08:07:19 +0000
commit6c5e26a705888de6ca7954104c08578cb679ea1f (patch)
tree5f71f4039330c70629e5e31746db9c98a040f462 /tools
parentcd7d07a63fb88b7beb7cb677e79c5eadde070c4a (diff)
downloadFreeBSD-src-6c5e26a705888de6ca7954104c08578cb679ea1f.zip
FreeBSD-src-6c5e26a705888de6ca7954104c08578cb679ea1f.tar.gz
Add missing includes and correct argument to sysctlbyname
PR: misc/120274 MFC after: 1 week
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/crypto/cryptostats.c4
-rw-r--r--tools/tools/crypto/cryptotest.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/tools/crypto/cryptostats.c b/tools/tools/crypto/cryptostats.c
index 83b8a67..d1c6115 100644
--- a/tools/tools/crypto/cryptostats.c
+++ b/tools/tools/crypto/cryptostats.c
@@ -31,6 +31,8 @@
* zero all the stats or just the timing stuff.
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
#include <sys/types.h>
#include <sys/sysctl.h>
@@ -58,7 +60,7 @@ main(int argc, char *argv[])
size_t slen;
slen = sizeof (stats);
- if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, NULL) < 0)
+ if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, 0) < 0)
err(1, "kern.cryptostats");
if (argc > 1 && strcmp(argv[1], "-z") == 0) {
diff --git a/tools/tools/crypto/cryptotest.c b/tools/tools/crypto/cryptotest.c
index 9bb93ea..13c52dd 100644
--- a/tools/tools/crypto/cryptotest.c
+++ b/tools/tools/crypto/cryptotest.c
@@ -93,6 +93,7 @@
#include <sys/mman.h>
#include <paths.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/sysctl.h>
#include <sys/time.h>
OpenPOWER on IntegriCloud