Fix two problems reported by Hasso Tepper via PR pkg/39554.

* OpenSSL portability problem.
* DragonFly support.
This commit is contained in:
taca 2008-09-16 03:27:19 +00:00
parent 6d3736aad7
commit c4f819041e
4 changed files with 61 additions and 8 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.1.1.1 2008/09/12 15:05:57 taca Exp $
$NetBSD: distinfo,v 1.2 2008/09/16 03:27:19 taca Exp $
SHA1 (squid-3.0.STABLE9.tar.bz2) = 3a06e62ef87caa23e64ee4192e6711dfe9d57591
RMD160 (squid-3.0.STABLE9.tar.bz2) = 012f3a125624782a96c52694ed68baabe50029c8
@ -13,5 +13,7 @@ SHA1 (patch-ag) = f9a83f8011b6ceab7a1ef17f6db0c4c65975be29
SHA1 (patch-ah) = 6590ac8377b5ceebd5930b7ac3a0f11bb716ea46
SHA1 (patch-ai) = ff9fd6979c9c13b57f10fb30bd25f39b7b99029c
SHA1 (patch-aj) = 5c68b5b6e9f916e78d6953ba8a0d2b42441940c1
SHA1 (patch-ak) = 17c38f5d4a85a96cf75410facf8f97feb750baf9
SHA1 (patch-ak) = 8cb0aaa7ea9d2241096cf82cf3640eea060ae85c
SHA1 (patch-al) = cd8eca5a945de8901d84beb432c3be59a6814e9c
SHA1 (patch-ba) = 005961d2dcfd765eb5a5daf9c199b123cb606190
SHA1 (patch-bb) = 05432a5fdd17342cfa11ef5686fa823b54917e8f

View file

@ -1,22 +1,28 @@
$NetBSD: patch-ak,v 1.1.1.1 2008/09/12 15:05:57 taca Exp $
$NetBSD: patch-ak,v 1.2 2008/09/16 03:27:19 taca Exp $
--- src/ssl_support.cc.orig 2008-07-18 19:02:54.000000000 +0900
--- src/ssl_support.cc.orig 2008-09-10 01:06:45.000000000 +0900
+++ src/ssl_support.cc
@@ -535,7 +535,7 @@ SSL_CTX *
@@ -535,7 +535,11 @@ SSL_CTX *
sslCreateServerContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *clientCA, const char *CAfile, const char *CApath, const char *CRLfile, const char *dhfile, const char *context)
{
int ssl_error;
- SSL_METHOD *method;
+#if OPENSSL_VERSION_NUMBER < 0x00909000L
SSL_METHOD *method;
+#else
+ const SSL_METHOD *method;
+#endif
SSL_CTX *sslContext;
long fl = ssl_parse_flags(flags);
@@ -732,7 +732,7 @@ SSL_CTX *
@@ -732,7 +736,11 @@ SSL_CTX *
sslCreateClientContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *CAfile, const char *CApath, const char *CRLfile)
{
int ssl_error;
- SSL_METHOD *method;
+#if OPENSSL_VERSION_NUMBER < 0x00909000L
SSL_METHOD *method;
+#else
+ const SSL_METHOD *method;
+#endif
SSL_CTX *sslContext;
long fl = ssl_parse_flags(flags);

View file

@ -0,0 +1,23 @@
$NetBSD: patch-ba,v 1.1 2008/09/16 03:27:19 taca Exp $
--- include/config.h.orig 2008-09-10 01:06:41.000000000 +0900
+++ include/config.h
@@ -111,6 +111,9 @@
#elif defined(__OpenBSD__)
#define _SQUID_OPENBSD_
+#elif defined(__DragonFly__)
+#define _SQUID_DRAGONFLY_
+
#elif defined(__CYGWIN32__) || defined(__CYGWIN__)
#define _SQUID_CYGWIN_
#define _SQUID_WIN32_
@@ -340,7 +343,7 @@ typedef union {
/*
* Don't allow inclusion of malloc.h on FreeBSD, Next and OpenBSD
*/
-#if defined(HAVE_MALLOC_H) && (defined(_SQUID_FREEBSD_) || defined(_SQUID_NEXT_) || defined(_SQUID_OPENBSD_))
+#if defined(HAVE_MALLOC_H) && (defined(_SQUID_FREEBSD_) || defined(_SQUID_NEXT_) || defined(_SQUID_OPENBSD_)) || defined(_SQUID_DRAGONFLY_)
#undef HAVE_MALLOC_H
#endif

View file

@ -0,0 +1,22 @@
$NetBSD: patch-bb,v 1.1 2008/09/16 03:27:19 taca Exp $
--- src/ACLARP.cc.orig 2008-09-10 01:06:42.000000000 +0900
+++ src/ACLARP.cc
@@ -67,7 +67,7 @@ struct arpreq
#endif
#include <net/route.h>
#include <net/if.h>
-#if defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_)
+#if defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_) || defined(_SQUID_DRAGONFLY_)
#include <net/if_arp.h>
#endif
#if HAVE_NETINET_IF_ETHER_H
@@ -438,7 +438,7 @@ aclMatchArp(SplayNode<acl_arp_data *> **
return (0 == splayLastResult);
}
-#elif defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_)
+#elif defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_) || defined(_SQUID_DRAGONFLY_)
struct arpreq arpReq;