$OpenBSD: patch-third_party_libjingle_source_talk_base_nethelpers_cc,v 1.3 2011/10/27 07:59:09 robert Exp $
--- third_party/libjingle/source/talk/base/nethelpers.cc.orig	Wed Oct 26 14:51:30 2011
+++ third_party/libjingle/source/talk/base/nethelpers.cc	Wed Oct 26 14:52:05 2011
@@ -57,7 +57,7 @@ void AsyncResolver::OnWorkDone() {
   }
 }
 
-#if defined(WIN32) || defined(ANDROID)
+#if defined(WIN32) || defined(ANDROID) || defined(__OpenBSD__)
 static hostent* DeepCopyHostent(const hostent* ent) {
   // Get the total number of bytes we need to copy, and allocate our buffer.
   int num_aliases = 0, num_addrs = 0;
@@ -168,6 +168,13 @@ hostent* SafeGetHostByName(const char* hostname, int* 
 #elif defined(OSX) || defined(IOS)
   // Mac OS returns an object with everything allocated.
   result = getipnodebyname(hostname, AF_INET, AI_DEFAULT, herrno);
+#elif defined(__OpenBSD__)
+  hostent* ent = gethostbyname(hostname);
+  if (!ent) {
+    return NULL;
+  }
+  result = DeepCopyHostent(ent);
+  *herrno = 0;
 #else
 #error "I don't know how to do gethostbyname safely on your system."
 #endif
