Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/npf/npfctl We don't use openssl for NPF in NetBSD, ...
details: https://anonhg.NetBSD.org/src/rev/221b8da15523
branches: trunk
changeset: 349896:221b8da15523
user: christos <christos%NetBSD.org@localhost>
date: Tue Dec 27 13:43:38 2016 +0000
description:
We don't use openssl for NPF in NetBSD, so don't include the header, and
provide a compatibility define.
diffstat:
usr.sbin/npf/npfctl/npfctl.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (47 lines):
diff -r 1a1a1d2ee187 -r 221b8da15523 usr.sbin/npf/npfctl/npfctl.c
--- a/usr.sbin/npf/npfctl/npfctl.c Tue Dec 27 12:09:19 2016 +0000
+++ b/usr.sbin/npf/npfctl/npfctl.c Tue Dec 27 13:43:38 2016 +0000
@@ -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 @@
#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 @@
#include <errno.h>
#include <arpa/inet.h>
-#include <openssl/sha.h>
#include "npfctl.h"
@@ -389,8 +391,8 @@
}
#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;
Home |
Main Index |
Thread Index |
Old Index