[cobalt] Fix GN build for linux

Change-Id: I526f0c449c6ce9b7ece5a21964f56af79072cd75
diff --git a/BUILD.gn b/BUILD.gn
index ab97e9d..ed19a3f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -10,6 +10,10 @@
 config("cares_config") {
   include_dirs = [ "." ]
   defines = [ "HAVE_CONFIG_H" ]
+
+  if (is_linux) {
+    defines += [ "_GNU_SOURCE" ]
+  }
 }
 
 static_library("cares") {