Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -50,10 +50,14 @@ AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime]) AC_SUBST(RUNTIME_DEF, "-DOF_APPLE_RUNTIME") objc_runtime="Apple"]) AC_MSG_RESULT($objc_runtime) +AC_CHECK_FUNC(objc_enumerationMutation, [ + AC_DEFINE(HAVE_OBJC_ENUMERATIONMUTATION, 1, + [Whether we have objc_enumerationMutation])]) + BUILDSYS_LIB AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins]) if test x"$PLUGIN_SUFFIX" != "x"; then AC_SUBST(OFPLUGIN_M, "OFPlugin.m") AC_SUBST(TESTPLUGIN, "plugin") Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -45,10 +45,14 @@ } alloc_failed_exception; #ifdef NEED_OBJC_SYNC_INIT extern BOOL objc_sync_init(); #endif + +#ifndef HAVE_OBJC_ENUMERATIONMUTATION +#define enumeration_mutation_handler objc_enumerationMutation +#endif void enumeration_mutation_handler(id object) { @throw [OFEnumerationMutationException newWithClass: [object class]];