$OpenBSD: patch-third_party_zlib_BUILD_gn,v 1.15 2019/09/23 07:18:04 robert Exp $

Index: third_party/zlib/BUILD.gn
--- third_party/zlib/BUILD.gn.orig
+++ third_party/zlib/BUILD.gn
@@ -72,7 +72,7 @@ if (use_arm_neon_optimizations) {
     # Disabled for iPhone, as described in DDI0487C_a_armv8_arm:
     #  "All implementations of the ARMv8.1 architecture are required to
     #   implement the CRC32* instructions. These are optional in ARMv8.0."
-    if (!is_ios) {
+    if (!is_ios && !is_openbsd) {
       defines = [ "CRC32_ARMV8_CRC32" ]
       if (is_android) {
         defines += [ "ARMV8_OS_ANDROID" ]
@@ -91,7 +91,7 @@ if (use_arm_neon_optimizations) {
   source_set("zlib_arm_crc32") {
     visibility = [ ":*" ]
 
-    if (!is_ios) {
+    if (!is_ios && !is_openbsd) {
       include_dirs = [ "." ]
 
       if (is_android) {
@@ -336,7 +336,7 @@ static_library("minizip") {
     ]
   }
 
-  if (is_mac || is_ios || is_android || is_nacl) {
+  if (is_mac || is_ios || is_android || is_nacl || is_openbsd) {
     # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
     # use fopen, ftell, and fseek instead on these systems.
     defines = [ "USE_FILE32API" ]
