$NetBSD: patch-ag,v 1.39 2017/06/23 19:18:07 maya Exp $

* Add support for NetBSD 8.
* Only define HAS_DB if it hasn't been defined.
* Add support for FreeBSD 11 and 12.

--- src/util/sys_defs.h.orig	2017-02-02 01:31:15.000000000 +0000
+++ src/util/sys_defs.h
@@ -30,13 +30,11 @@
 #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
     || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
     || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
+    || defined(FREEBSD11) || defined(FREEBSD12) \
     || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
     || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
     || defined(OPENBSD5) || defined(OPENBSD6) \
-    || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \
-    || defined(NETBSD4) || defined(NETBSD5) || defined(NETBSD6) \
-    || defined(NETBSD7) \
-    || defined(EKKOBSD1) || defined(DRAGONFLY)
+    || defined(NETBSD) || defined(EKKOBSD1) || defined(DRAGONFLY)
 #define SUPPORTED
 #include <sys/param.h>
 #define UINT32_TYPE	unsigned int
@@ -48,7 +46,9 @@
 #define DEF_MAILBOX_LOCK "flock, dotlock"
 #define HAS_SUN_LEN
 #define HAS_FSYNC
+#ifndef HAS_DB
 #define HAS_DB
+#endif
 #define HAS_SA_LEN
 #define NATIVE_DB_TYPE	"hash"
 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
@@ -1250,6 +1250,8 @@ extern int h_errno;
 #define DEF_SMTP_CACHE_DEMAND	0
 #endif
 
+#define RECEIVED_ENVELOPE_FROM
+
  /*
   * We're not going to try to guess like configure does.
   */
