diff options
| author | christos <christos@NetBSD.org> | 2016-12-27 13:43:38 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2016-12-27 13:43:38 +0000 |
| commit | a2fad11ca25edba763578dc73eb8eb2d330c29d9 (patch) | |
| tree | e382db7a7381b1ff01957dede583dfef5ee8f190 | |
| parent | 79f3b1ea5e1a296861574e329ab0640c3afcd22b (diff) | |
We don't use openssl for NPF in NetBSD, so don't include the header, and
provide a compatibility define.
| -rw-r--r-- | usr.sbin/npf/npfctl/npfctl.c | 12 |
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; |
