Module Name: src Committed By: christos Date: Tue Dec 27 13:43:38 UTC 2016
Modified Files: src/usr.sbin/npf/npfctl: npfctl.c Log Message: We don't use openssl for NPF in NetBSD, so don't include the header, and provide a compatibility define. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/npf/npfctl/npfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/npf/npfctl/npfctl.c diff -u src/usr.sbin/npf/npfctl/npfctl.c:1.48 src/usr.sbin/npf/npfctl/npfctl.c:1.49 --- src/usr.sbin/npf/npfctl/npfctl.c:1.48 Mon Dec 26 18:05:05 2016 +++ src/usr.sbin/npf/npfctl/npfctl.c Tue Dec 27 08:43:38 2016 @@ -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/1 #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/1 #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;