$OpenBSD: patch-net_BUILD_gn,v 1.27 2019/09/23 07:18:04 robert Exp $
Index: net/BUILD.gn
--- net/BUILD.gn.orig
+++ net/BUILD.gn
@@ -105,7 +105,7 @@ net_configs = [
   "//build/config/compiler:wexit_time_destructors",
 ]
 
-if (is_linux) {
+if (is_linux && !is_openbsd) {
   net_configs += [ "//build/config/linux:libresolv" ]
 }
 
@@ -1913,7 +1913,7 @@ component("net") {
       }
     }
 
-    if (is_android || is_chromeos) {
+    if (is_android || is_chromeos || is_openbsd) {
       sources += [
         "base/network_change_notifier_posix.cc",
         "base/network_change_notifier_posix.h",
@@ -1946,7 +1946,7 @@ component("net") {
     }
 
     # Use getifaddrs() on POSIX platforms, except Linux and Android.
-    if (is_posix && !is_linux && !is_android) {
+    if (is_posix && !is_android) {
       sources += [
         "base/network_interfaces_getifaddrs.cc",
         "base/network_interfaces_getifaddrs.h",
@@ -2148,6 +2148,15 @@ component("net") {
       ]
     }
 
+    if (is_openbsd) {
+      sources -= [
+        "base/address_tracker_linux.cc",
+        "base/address_tracker_linux.h",
+        "base/network_change_notifier_linux.cc",
+        "base/network_interfaces_linux.cc",
+      ]
+    }
+
     if (!disable_ftp_support) {
       sources += [
         "ftp/ftp_auth_cache.cc",
@@ -5995,7 +6004,7 @@ test("net_unittests") {
   }
 
   # Use getifaddrs() on POSIX platforms, except Linux and Android.
-  if (is_posix && !is_linux && !is_android) {
+  if (is_posix && !is_android) {
     sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ]
   }
 
