@@ -39,11 +39,11 @@ #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" -#ifndef HAVE_POSIX_SPAWNP +#if !defined(HAVE_POSIX_SPAWNP) || !defined(HAVE_SPAWN_H) extern char **environ; #endif @interface OFSubprocess () - (void)of_getArgv: (char ***)argv @@ -141,11 +141,11 @@ forProgramName: programName andArguments: arguments]; @try { env = [self of_environmentForDictionary: environment]; -#ifdef HAVE_POSIX_SPAWNP +#if defined(HAVE_POSIX_SPAWNP) && defined(HAVE_SPAWN_H) posix_spawn_file_actions_t actions; posix_spawnattr_t attr; if (posix_spawn_file_actions_init(&actions) != 0) @throw [OFInitializationFailedException