$OpenBSD: patch-sope-appserver_NGObjWeb_NSObject+WO_m,v 1.2 2014/05/16 14:54:16 giovanni Exp $

fix for build with libobjc2-1.7
patch from David Chisnall

--- sope-appserver/NGObjWeb/NSObject+WO.m.orig	Wed Dec  4 17:51:26 2013
+++ sope-appserver/NGObjWeb/NSObject+WO.m	Thu May 15 18:21:20 2014
@@ -259,7 +259,7 @@ IMP WOGetKVCGetMethod(id object, NSString *_key) {
   if (object == nil) return NULL;
   if (_key   == nil) return NULL;
 
-#if GNU_RUNTIME && !(defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911))
+#if GNU_RUNTIME && !(defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) && !defined(__GNUSTEP_RUNTIME__)
   {
     unsigned keyLen;
     char     *buf;
@@ -317,7 +317,9 @@ id WOGetKVCValueUsingMethod(id object, NSString *_key)
       return nil;
     free(buf); buf = NULL;
   }
-#if GNUSTEP_BASE_LIBRARY
+// This appears to be a work around for an old version of GNUstep-base not
+// correctly handling the case where there is no method.
+#if GNUSTEP_BASE_LIBRARY && !defined(__GNUSTEP_RUNTIME__)
   if (!__objc_responds_to(object, getSel))
     return nil;
 #endif
