summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/npf/npfctl/npfctl.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/npf/npfctl/npfctl.c b/usr.sbin/npf/npfctl/npfctl.c
index 72933bb416a..2f850858674 100644
--- a/usr.sbin/npf/npfctl/npfctl.c
+++ b/usr.sbin/npf/npfctl/npfctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: npfctl.c,v 1.48 2016/12/26 23:05:05 christos Exp $ */
+/* $NetBSD: npfctl.c,v 1.49 2016/12/27 13:43:38 christos Exp $ */
/*-
* Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: npfctl.c,v 1.48 2016/12/26 23:05:05 christos Exp $");
+__RCSID("$NetBSD: npfctl.c,v 1.49 2016/12/27 13:43:38 christos Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -39,6 +39,9 @@ __RCSID("$NetBSD: npfctl.c,v 1.48 2016/12/26 23:05:05 christos Exp $");
#include <sha1.h>
#include <sys/ioctl.h>
#include <sys/module.h>
+#define SHA_DIGEST_LENGTH SHA1_DIGEST_LENGTH
+#else
+#include <openssl/sha.h>
#endif
#include <stdio.h>
@@ -50,7 +53,6 @@ __RCSID("$NetBSD: npfctl.c,v 1.48 2016/12/26 23:05:05 christos Exp $");
#include <errno.h>
#include <arpa/inet.h>
-#include <openssl/sha.h>
#include "npfctl.h"
@@ -389,8 +391,8 @@ npfctl_parse_rule(int argc, char **argv)
}
#ifdef __NetBSD__
-unsigned char *
-SHA1(const unsigned char *d, unsigned long l, unsigned char *md)
+static unsigned char *
+SHA1(const unsigned char *d, size_t l, unsigned char *md)
{
SHA1_CTX c;