Support GN build on host

Change-Id: Ibd1f40d2100149e538820ab72fb483d1eb392777
diff --git a/BUILD.gn b/BUILD.gn
index f31e6f2..b90b07e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -307,6 +307,9 @@
     "CURL_HIDDEN_SYMBOLS",
     "HAVE_CONFIG_H",
   ]
+  if (is_linux) {
+    defines += [ "_GNU_SOURCE" ]
+  }
   include_dirs = [ "lib" ]
   public_configs = [ ":curl_config" ]
 }
@@ -409,5 +412,8 @@
     "//third_party/zlib",
   ]
   defines = [ "HAVE_CONFIG_H" ]
+  if (is_linux) {
+    defines += [ "_GNU_SOURCE" ]
+  }
   include_dirs = [ "lib" ]
 }