$OpenBSD: patch-sope-appserver_NGObjWeb_NSObject+WO_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $

fix for build with libobjc2-1.7
patch from David Chisnall

--- sope-appserver/NGObjWeb/NSObject+WO.m.orig	Thu Oct 17 12:25:53 2013
+++ sope-appserver/NGObjWeb/NSObject+WO.m	Thu Oct 17 12:25:53 2013
@@ -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;
@@ -313,7 +313,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
